Skip to content

Commit

Permalink
update benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
luizirber committed Jun 29, 2024
1 parent 8118f96 commit 7f4cffa
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 13 deletions.
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

0 comments on commit 7f4cffa

Please sign in to comment.