Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
benchmark
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
benchmark
Commits
9a5072d1
Commit
9a5072d1
authored
Apr 04, 2017
by
jpmag
Committed by
Dominic Hamon
Apr 04, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #357: broken RMS values when time unit is set. (#362)
parent
2fa6dfff
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
complexity.cc
src/complexity.cc
+8
-0
No files found.
src/complexity.cc
View file @
9a5072d1
...
@@ -295,6 +295,11 @@ std::vector<BenchmarkReporter::Run> ComputeBigO(
...
@@ -295,6 +295,11 @@ std::vector<BenchmarkReporter::Run> ComputeBigO(
big_o
.
report_big_o
=
true
;
big_o
.
report_big_o
=
true
;
big_o
.
complexity
=
result_cpu
.
complexity
;
big_o
.
complexity
=
result_cpu
.
complexity
;
// All the time results are reported after being multiplied by the
// time unit multiplier. But since RMS is a relative quantity it
// should not be multiplied at all. So, here, we _divide_ it by the
// multiplier so that when it is multiplied later the result is the
// correct one.
double
multiplier
=
GetTimeUnitMultiplier
(
reports
[
0
].
time_unit
);
double
multiplier
=
GetTimeUnitMultiplier
(
reports
[
0
].
time_unit
);
// Only add label to mean/stddev if it is same for all runs
// Only add label to mean/stddev if it is same for all runs
...
@@ -307,6 +312,9 @@ std::vector<BenchmarkReporter::Run> ComputeBigO(
...
@@ -307,6 +312,9 @@ std::vector<BenchmarkReporter::Run> ComputeBigO(
rms
.
cpu_accumulated_time
=
result_cpu
.
rms
/
multiplier
;
rms
.
cpu_accumulated_time
=
result_cpu
.
rms
/
multiplier
;
rms
.
report_rms
=
true
;
rms
.
report_rms
=
true
;
rms
.
complexity
=
result_cpu
.
complexity
;
rms
.
complexity
=
result_cpu
.
complexity
;
// don't forget to keep the time unit, or we won't be able to
// recover the correct value.
rms
.
time_unit
=
reports
[
0
].
time_unit
;
results
.
push_back
(
big_o
);
results
.
push_back
(
big_o
);
results
.
push_back
(
rms
);
results
.
push_back
(
rms
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment