abseil / abseil/abseil-cpp

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

Aberta
#1,822 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
C++
Estrelas
18.1k
Forks
3.2k
Merge médio
20h 36min
PRs com merge (30d)
1

Descrição

### 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_

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.