google / google/benchmark

[FR] Report cross-thread statistics for multithreaded runs

Open
#1,902 4 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
C++
Stars
10.4k
Forks
1.8k
Avg merge
2d 4h
Merged PRs (30d)
8

Description

**Is your feature request related to a problem? Please describe.**
When running multithreaded benchmarks - in certain cases there is a need to understand a "fairness" of the measured code, i.e. if work is equally distributed among all threads and/or if all threads were able to acquire some resource in an equal (or intentionally unequal) manner.
Currently counters for all threads are summed and normalized which in fact leads to a loss of information about how work of each thread compares to its peers.

**Describe the solution you'd like**
Is it possible to output the same set of statistics for multithreaded runs on a cross-thread basis as it exists today for repeated runs? I.e. to see median and stddev between N threads of the same multithreaded run?

**Describe alternatives you've considered**
Tried to leverage existing API, like custom counters but it appears that it also undergoes the same averaging for all threads so basically info about individual thread results is lost already. So there is no alternative as I understand it.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.