Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable codspeed for Rust perf tracking #3231

Merged
merged 8 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update benchmarks
  • Loading branch information
luizirber committed Jul 24, 2024
commit 7b0b72fa9a6905b934de14b575aa757f116ba40f
33 changes: 33 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ typed-builder = "0.18.0"
vec-collections = "0.4.3"

[dev-dependencies]
codspeed-criterion-compat = "2.6.0"
proptest = { version = "1.5.0", default-features = false, features = ["std"]}
rand = "0.8.2"
tempfile = "3.10.1"
Expand Down
5 changes: 1 addition & 4 deletions src/core/benches/compute.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#[macro_use]
extern crate criterion;
use codspeed_criterion_compat::{black_box, criterion_group, criterion_main, Criterion};

use std::fs::File;
use std::io::{Cursor, Read};
Expand All @@ -8,8 +7,6 @@ use needletail::parse_fastx_reader;
use sourmash::cmd::ComputeParameters;
use sourmash::signature::Signature;

use criterion::Criterion;

fn add_sequence(c: &mut Criterion) {
let cp = ComputeParameters::default();
let template_sig = Signature::from_params(&cp);
Expand Down
2 changes: 1 addition & 1 deletion src/core/benches/gather.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use sourmash::signature::Signature;
use sourmash::sketch::Sketch;
use sourmash::{index::calculate_gather_stats, storage::SigStore};

use criterion::{black_box, criterion_group, criterion_main, Criterion};
use codspeed_criterion_compat::{black_box, criterion_group, criterion_main, Criterion};

fn gather_stats_benchmarks(c: &mut Criterion) {
let mut filename = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
Expand Down
5 changes: 1 addition & 4 deletions src/core/benches/minhash.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#[macro_use]
extern crate criterion;

use std::fs::File;
use std::io::BufReader;
use std::path::PathBuf;
Expand All @@ -9,7 +6,7 @@ use sourmash::signature::{Signature, SigsTrait};
use sourmash::sketch::minhash::{KmerMinHash, KmerMinHashBTree};
use sourmash::sketch::Sketch;

use criterion::Criterion;
use codspeed_criterion_compat::{black_box, criterion_group, criterion_main, Criterion};

fn intersection(c: &mut Criterion) {
let mut filename = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
Expand Down
5 changes: 1 addition & 4 deletions src/core/benches/nodegraph.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
#[macro_use]
extern crate criterion;

use std::fs::File;
use std::io::{BufWriter, Cursor, Read};

use sourmash::sketch::nodegraph::Nodegraph;

use criterion::Criterion;
use codspeed_criterion_compat::{black_box, criterion_group, criterion_main, Criterion};

fn save_load(c: &mut Criterion) {
let mut data: Vec<u8> = vec![];
Expand Down