From 12e185672e0533e7a0db7a6897f8a777b2141f94 Mon Sep 17 00:00:00 2001 From: "Zezheng.Li" Date: Mon, 14 Oct 2024 17:27:40 +0800 Subject: [PATCH] fix oom --- src/metric/benchmark/bench.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/metric/benchmark/bench.hpp b/src/metric/benchmark/bench.hpp index 0e351f830..b464df58d 100644 --- a/src/metric/benchmark/bench.hpp +++ b/src/metric/benchmark/bench.hpp @@ -39,7 +39,7 @@ void bench_mixed_impl(IMPL& impl, WRITE_OP&& op, size_t thd_num, vec.push_back(std::thread([&, i] { bench_clock_t clock_loop; auto dur = clock.duration(); - while (!stop || dur < duration * 2) { + while (!stop && dur < duration + 1s) { op(); auto new_dur = clock.duration(); lantency_summary.observe((new_dur - dur).count() / 1000.0f);