diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2023-08-06 17:49:04 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2023-08-06 18:52:22 +0300 |
commit | d1257d50ffa27ba0ba788a7dd11a797bfbdad0c5 (patch) | |
tree | a2542be3d06def7363e3b441e98a46c3625ddb79 /library | |
parent | 0febbe057bd1155f09bd3a5205b62a2236739b05 (diff) | |
download | ydb-d1257d50ffa27ba0ba788a7dd11a797bfbdad0c5.tar.gz |
Intermediate changes
Diffstat (limited to 'library')
-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 9d300b6726..86c751a7bb 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) { |