abseil / abseil/abseil-cpp

[Bug]: //absl/random/internal:nanobenchmark_test usually fails on a machine with low timer counter resolution

未關閉
#1,822 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
C++
星號
18.1k
分支
3.2k
平均合併
20 小時 36 分鐘
30 天內合併 PR
1

描述

### Describe the issue

On a machine with a low enough timer counter resolution, such as Apple M2 (and I think M1), which has a 24 MHz resolution, this check usually fails:

https://github.com/abseil/abseil-cpp/blob/74058c0f49a06fa10b07e78f48d75b3569e9f51b/absl/random/internal/nanobenchmark.cc#L521

causing the test to fail. This is because the timer counter is unlikely to tick between when the test starts and when it ends.

### Steps to reproduce the problem

`bazel test //absl/random/internal:nanobenchmark_test` on an M1 or M2 Mac running Fedora Asahi Remix or (untested) a Linux VM on macOS or directly on macOS.

### What version of Abseil are you using?

0f102ad442efaea4df9f8fe66511314c71dff24f

### What operating system and version are you using?

Linux (Fedora Asahi Remix 41)

### What compiler and version are you using?

clang version 19.1.7 (Fedora 19.1.7-1.fc41)

### What build system are you using?

bazel 8.0.1

### Additional context

_No response_

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。