Skip to content

Commit

Permalink
fix: adjust benchmarks to the changes in alignment functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-aksamentov committed Sep 8, 2023
1 parent 80b7378 commit 119cd4a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
7 changes: 2 additions & 5 deletions packages_rs/nextclade/benches/bench_create_stripes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ pub fn bench_create_stripes(c: &mut Criterion) {
let excess_bandwidth = black_box(2);
let qry_len = black_box(30);
let ref_len = black_box(40);
let max_indel = black_box(400);
let allowed_mismatches = black_box(2);
let max_band_area = black_box(500_000_000);
let minimal_bandwidth = black_box(0);

let mut group = c.benchmark_group("create_stripes");
group.throughput(Throughput::Bytes(qry_len as u64));
Expand All @@ -36,8 +34,7 @@ pub fn bench_create_stripes(c: &mut Criterion) {
ref_len,
terminal_bandwidth,
excess_bandwidth,
allowed_mismatches,
max_band_area,
minimal_bandwidth,
)
});
});
Expand Down
9 changes: 4 additions & 5 deletions packages_rs/nextclade/benches/bench_seed_alignment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use nextclade::align::params::AlignPairwiseParams;
use nextclade::align::seed_alignment::create_alignment_band;
use nextclade::align::seed_match2::{get_seed_matches_maybe_reverse_complement, CodonSpacedIndex, SeedMatchesResult};
use nextclade::alphabet::nuc::to_nuc_seq;
use nextclade::gene::gene_map::GeneMap;

pub fn bench_seed_alignment(c: &mut Criterion) {
let params = AlignPairwiseParams::default();
Expand All @@ -20,6 +19,8 @@ pub fn bench_seed_alignment(c: &mut Criterion) {

let seed_index = CodonSpacedIndex::from_sequence(&ref_seq);

let minimal_bandwidth = black_box(0);

let mut group = c.benchmark_group("seed_alignment");
group.bench_function("seed_match", |b| {
b.iter(|| {
Expand All @@ -32,10 +33,8 @@ pub fn bench_seed_alignment(c: &mut Criterion) {
ref_seq.len() as isize,
params.terminal_bandwidth as isize,
params.excess_bandwidth as isize,
params.allowed_mismatches as isize,
params.max_band_area,
)
.unwrap();
minimal_bandwidth,
);
});
});
group.finish();
Expand Down

1 comment on commit 119cd4a

@vercel
Copy link

@vercel vercel bot commented on 119cd4a Sep 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nextclade – ./

nextclade-nextstrain.vercel.app
nextclade-git-master-nextstrain.vercel.app
nextclade.vercel.app

Please sign in to comment.