From a26ce061928ff59a3b631e95fa8823ccc0e07fdf Mon Sep 17 00:00:00 2001 From: tibvdm Date: Tue, 27 Aug 2024 14:07:27 +0200 Subject: [PATCH] add print information to track filling the cache --- sa-index/src/sa_searcher.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sa-index/src/sa_searcher.rs b/sa-index/src/sa_searcher.rs index 1caff1e..4b64137 100644 --- a/sa-index/src/sa_searcher.rs +++ b/sa-index/src/sa_searcher.rs @@ -150,8 +150,14 @@ impl Searcher { // Create the Searcher object let mut searcher = Self { sa, kmer_cache, proteins, suffix_index_to_protein }; + let print_step_size = searcher.kmer_cache.base.pow(k as u32) / 100; + // Update the bounds for all 3-mers in the KTable for i in 0..searcher.kmer_cache.base.pow(k as u32) { + if i % print_step_size == 0 { + eprintln!("Updating kmer cache: {}%", i / print_step_size); + } + let kmer = searcher.kmer_cache.index_to_kmer(i); // Calculate stricter starting bounds for the 3-mers @@ -164,6 +170,8 @@ impl Searcher { } } + eprintln!("Updating kmer cache: 100%"); + searcher }