Skip to content

Conversation

@ivafanas
Copy link
Contributor

@ivafanas ivafanas commented Jan 2, 2024

clock_gettime resolution is implementation defined:
https://linux.die.net/man/3/clock_gettime

double StatisticsCV(const std::vector<double>& v) function gets vector of zeroes on system with low frequency timers in user_counters_tabular_test test BM_Counters_Tabular/repeats:2/threads:1_cv case. Division result is nan and test fails due to regexp mismatch.

Additionally, division by zero (even FP zero) is a UB in C++ and should be avoided.

@google-cla
Copy link

google-cla bot commented Jan 2, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@dmah42
Copy link
Member

dmah42 commented Jan 3, 2024

nice :) thanks.

@dmah42 dmah42 merged commit 2d2e07e into google:main Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants