Skip to content

Commit

Permalink
fix small bugs
Browse files Browse the repository at this point in the history
Signed-off-by: yangxuan <[email protected]>
  • Loading branch information
XuanYang-cn committed Nov 12, 2024
1 parent 7569c20 commit 84bb14f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vectordb_bench/backend/runner/read_write_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,18 @@ def run_search_by_sig(self, q):
if batch >= target_batch:
perc = int(stage * 100)
log.info(f"Insert {perc}% done, total batch={total_batch}")
log.info(f"[{batch:6}/{total_batch:6}|] Serial search - {perc}% start")
log.info(f"[{batch:5}|{total_batch:5}|] Serial search - {perc}% start")
recall, ndcg, p99 =self.serial_search_runner.run()

if idx < len(self.search_stage) - 1:
if idx < len(self.search_stage):
stage_search_dur = (self.data_volume * (self.search_stage[idx + 1] - stage) // self.insert_rate) // len(self.concurrencies)
if stage_search_dur < 30:
log.warning(f"Search duration too short, please reduce concurrency count or insert rate, or increase dataset volume: dur={stage_search_dur}, concurrencies={len(self.concurrencies)}, insert_rate={self.insert_rate}")
log.info(f"[{batch:6}/{total_batch:6}|]Conc search - {perc}% start, dur for each conc={stage_search_dur}s")
log.info(f"[{batch:5}|{total_batch:5}|]Conc search - {perc}% start, dur for each conc={stage_search_dur}s")
else:
last_search_dur = self.data_volume * (1.0 - stage) // self.insert_rate
stage_search_dur = last_search_dur + self.read_dur_after_write
log.info(f"[{batch:6}/{total_batch:6}|]Last conc search - {perc}% start, [read_until_write|read_after_write|total] =[{last_search_dur}s|{self.read_dur_after_write}]s|{stage_search_dur}s")
log.info(f"[{batch:5}/{total_batch:5}|]Last conc search - {perc}% start, [read_until_write|read_after_write|total] =[{last_search_dur}s|{self.read_dur_after_write}]s|{stage_search_dur}s")

max_qps = self.run_by_dur(stage_search_dur)
res.append((perc, max_qps, recall))
Expand Down

0 comments on commit 84bb14f

Please sign in to comment.