aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2023-08-06 17:49:04 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2023-08-06 18:52:22 +0300
commitd1257d50ffa27ba0ba788a7dd11a797bfbdad0c5 (patch)
treea2542be3d06def7363e3b441e98a46c3625ddb79 /library/cpp
parent0febbe057bd1155f09bd3a5205b62a2236739b05 (diff)
downloadydb-d1257d50ffa27ba0ba788a7dd11a797bfbdad0c5.tar.gz
Intermediate changes
Diffstat (limited to 'library/cpp')
-rw-r--r--library/cpp/yt/cpu_clock/benchmark/benchmark.cpp9
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) {