diff options
| author | robot-piglet <[email protected]> | 2023-08-06 17:49:04 +0300 | 
|---|---|---|
| committer | robot-piglet <[email protected]> | 2023-08-06 18:52:22 +0300 | 
| commit | d1257d50ffa27ba0ba788a7dd11a797bfbdad0c5 (patch) | |
| tree | a2542be3d06def7363e3b441e98a46c3625ddb79 /library/cpp | |
| parent | 0febbe057bd1155f09bd3a5205b62a2236739b05 (diff) | |
Intermediate changes
Diffstat (limited to 'library/cpp')
| -rw-r--r-- | library/cpp/yt/cpu_clock/benchmark/benchmark.cpp | 9 | 
1 files changed, 9 insertions, 0 deletions
| diff --git a/library/cpp/yt/cpu_clock/benchmark/benchmark.cpp b/library/cpp/yt/cpu_clock/benchmark/benchmark.cpp index 9d300b6726e..86c751a7bb3 100644 --- a/library/cpp/yt/cpu_clock/benchmark/benchmark.cpp +++ b/library/cpp/yt/cpu_clock/benchmark/benchmark.cpp @@ -26,6 +26,15 @@ void BM_GetCpuApproximateInstant(benchmark::State& state)  BENCHMARK(BM_GetCpuApproximateInstant); +void BM_GetInstant(benchmark::State& state) +{ +    for (auto _ : state) { +        benchmark::DoNotOptimize(GetInstant()); +    } +} + +BENCHMARK(BM_GetInstant); +  void BM_InstantNow(benchmark::State& state)  {      for (auto _ : state) { | 
