diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-07-22 12:30:43 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2024-07-22 12:42:10 +0300 |
commit | 224f37eff4b81b528e56c22e48ab3ecf6500a593 (patch) | |
tree | eb45faabd3a008b08639c516caed25d5e974e3cc /contrib/restricted/google/benchmark/src/timers.cc | |
parent | 942d2ca60b764e6bd7dff28a3ef04fefacbd576d (diff) | |
download | ydb-224f37eff4b81b528e56c22e48ab3ecf6500a593.tar.gz |
Intermediate changes
Diffstat (limited to 'contrib/restricted/google/benchmark/src/timers.cc')
-rw-r--r-- | contrib/restricted/google/benchmark/src/timers.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/contrib/restricted/google/benchmark/src/timers.cc b/contrib/restricted/google/benchmark/src/timers.cc index c392649715..a0543fe3d1 100644 --- a/contrib/restricted/google/benchmark/src/timers.cc +++ b/contrib/restricted/google/benchmark/src/timers.cc @@ -126,8 +126,12 @@ double ProcessCPUUsage() { return MakeTime(kernel_time, user_time); DiagnoseAndExit("GetProccessTimes() failed"); #elif defined(BENCHMARK_OS_QURT) + // Note that qurt_timer_get_ticks() is no longer documented as of SDK 5.3.0, + // and doesn't appear to work on at least some devices (eg Samsung S22), + // so let's use the actually-documented and apparently-equivalent + // qurt_sysclock_get_hw_ticks() call instead. return static_cast<double>( - qurt_timer_timetick_to_us(qurt_timer_get_ticks())) * + qurt_timer_timetick_to_us(qurt_sysclock_get_hw_ticks())) * 1.0e-6; #elif defined(BENCHMARK_OS_EMSCRIPTEN) // clock_gettime(CLOCK_PROCESS_CPUTIME_ID, ...) returns 0 on Emscripten. @@ -160,8 +164,12 @@ double ThreadCPUUsage() { &user_time); return MakeTime(kernel_time, user_time); #elif defined(BENCHMARK_OS_QURT) + // Note that qurt_timer_get_ticks() is no longer documented as of SDK 5.3.0, + // and doesn't appear to work on at least some devices (eg Samsung S22), + // so let's use the actually-documented and apparently-equivalent + // qurt_sysclock_get_hw_ticks() call instead. return static_cast<double>( - qurt_timer_timetick_to_us(qurt_timer_get_ticks())) * + qurt_timer_timetick_to_us(qurt_sysclock_get_hw_ticks())) * 1.0e-6; #elif defined(BENCHMARK_OS_MACOSX) // FIXME We want to use clock_gettime, but its not available in MacOS 10.11. |