diff --git a/3party/gperftools/src/profiler.cc b/3party/gperftools/src/profiler.cc index 491e3ea..71a3cef 100644 --- a/3party/gperftools/src/profiler.cc +++ b/3party/gperftools/src/profiler.cc @@ -169,7 +169,7 @@ CpuProfilerSwitch(int signal_number) int cur_profile_count = profile_count; std::thread([interval, cur_profile_count] { std::this_thread::sleep_for(std::chrono::seconds(interval)); - if (profile_count == cur_profile_count) { + if (profile_count == cur_profile_count + 1) { RAW_LOG(INFO, "Trigger Auto stop CPU Profiling, duration=%ds", interval); ProfilerStop(); }