Skip to content

Commit

Permalink
fix: rate_runner
Browse files Browse the repository at this point in the history
Signed-off-by: min.tian <min.tian.cn@gmail.com>
  • Loading branch information
alwayslove2013 committed Jan 22, 2025
1 parent d30f816 commit d3693de
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions vectordb_bench/backend/runner/rate_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ def check_and_send_signal(wait_interval: float, finished: bool = False):
)
_ = [fut.result() for fut in done]
if len(not_done) > 0:
log.warning(f"[{len(not_done)}] tasks are not done, trying to wait in the next round")
self.executing_futures = list(not_done)
if len(not_done) > 100:
log.warning(f"[{len(not_done)}] tasks are not done, trying to wait in the next round")
else:
self.executing_futures = []

Expand Down Expand Up @@ -100,13 +101,13 @@ def check_and_send_signal(wait_interval: float, finished: bool = False):
if finished is True:
log.info(f"End of dataset, left unfinished={len(self.executing_futures)}")
break
if elapsed_time >= 0.9:
if elapsed_time >= 1.5:
log.warning(
f"Submit insert tasks took {elapsed_time}s, expected 1s, "
f"indicating potential resource limitations on the client machine.",
)

wait_interval = time_per_batch - elapsed_time if elapsed_time < time_per_batch else 0.001
wait_interval = 0.001
check_and_send_signal(wait_interval, finished=False)

dur = time.perf_counter() - start_time - inserted_batch_cnt * time_per_batch
Expand Down

0 comments on commit d3693de

Please sign in to comment.