testing: show rusage statistics for benchmarks #24905
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
When optimizing CPU usage, it would be useful to get CPU usage information from Go benchmarks.
Could we add, where supported, getrusage calls before and after running each benchmark, in addition to wall-time?
I have no opinion about the API for requesting those statistics. Perhaps adding a
-test.stats
or-test.resources
flag would work?For example:
-test.stats=utime,stime,maxrss
.This doesn't have to be rusage specific. For instance, it could be extended with statistics from the perf_event API at some point.
I could send a CL if this is a welcome change.
The text was updated successfully, but these errors were encountered: