-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce per-thread times to console and json reporters
See #1834 for detailed description of why this is useful.
- Loading branch information
Showing
7 changed files
with
104 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -274,11 +274,25 @@ void JSONReporter::PrintRunData(Run const& run) { | |
run.aggregate_unit == StatisticUnit::kTime) { | ||
out << indent << FormatKV("real_time", run.GetAdjustedRealTime()) | ||
<< ",\n"; | ||
if (run.threads != 1) { | ||
out << indent | ||
<< FormatKV( | ||
"per_thread_real_time", | ||
run.GetAdjustedRealTime() * static_cast<double>(run.threads)) | ||
<< ",\n"; | ||
} | ||
out << indent << FormatKV("cpu_time", run.GetAdjustedCPUTime()); | ||
} else { | ||
assert(run.aggregate_unit == StatisticUnit::kPercentage); | ||
out << indent << FormatKV("real_time", run.real_accumulated_time) | ||
<< ",\n"; | ||
if (run.threads != 1) { | ||
out << indent | ||
<< FormatKV( | ||
"per_thread_real_time", | ||
run.real_accumulated_time * static_cast<double>(run.threads)) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
LebedevRI
Collaborator
|
||
<< ",\n"; | ||
} | ||
out << indent << FormatKV("cpu_time", run.cpu_accumulated_time); | ||
} | ||
out << ",\n" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Sorry, I'm confused - should this be division? (total accumulated time divided by the number of threads?)