Skip to content

Commit 57dcc99

Browse files
committed
Small fix
1 parent 4aca213 commit 57dcc99

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

sa-benchmarks/src/main.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use sa_index::suffix_to_protein_index::SuffixToProteinMapping;
1313
use sa_server::{load_kmer_table_file, load_mapping_file, load_proteins_file, load_suffix_array_file};
1414
use serde::Serialize;
1515
use sysinfo::{Pid, System};
16-
use text_compression::WriteBinary;
1716

1817
/// Schema version — increment when the output JSON format changes
1918
const SCHEMA_VERSION: u32 = 1;
@@ -236,7 +235,7 @@ fn theoretical_memory(searcher: &Searcher, mapping_type: &str, use_mmap: bool) -
236235

237236
// k-mer table size: 16 bytes per entry, AMINO_ACID_COUNT^k entries total
238237
let kmer_table_bytes = searcher.kmer_table.as_ref().map_or(0, |t| {
239-
(AMINO_ACID_COUNT as u64).pow(t.k as u32) * 16
238+
(AMINO_ACID_COUNT as u64).pow(t.max_k as u32) * 16
240239
});
241240

242241
sa_bytes + text_bytes + metadata_bytes + mapping_bytes + kmer_table_bytes
@@ -390,7 +389,7 @@ fn main() -> Result<(), Box<dyn Error>> {
390389
if let Some(ref path) = args.kmer_table_file {
391390
eprintln!("Loading k-mer table from {}...", path.display());
392391
let table = load_kmer_table_file(path.to_str().unwrap())?;
393-
eprintln!(" k={}", table.k);
392+
eprintln!(" k={}", table.max_k);
394393
searcher = searcher.with_kmer_table(table);
395394
}
396395

0 commit comments

Comments
 (0)