-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Open
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
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.
Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.