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
df7c7ee1
Unverified
Commit
df7c7ee1
authored
Mar 06, 2019
by
Roman Lebedev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Tooling] report.py: whoops, don't ignore the rest of benches after a bad one.
Refs #779.
parent
f62c63b1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
30 deletions
+30
-30
test1_run1.json
tools/gbench/Inputs/test1_run1.json
+14
-14
test1_run2.json
tools/gbench/Inputs/test1_run2.json
+14
-14
report.py
tools/gbench/report.py
+2
-2
No files found.
tools/gbench/Inputs/test1_run1.json
View file @
df7c7ee1
...
@@ -85,20 +85,6 @@
...
@@ -85,20 +85,6 @@
"time_unit"
:
"ns"
"time_unit"
:
"ns"
},
},
{
{
"name"
:
"BM_BadTimeUnit"
,
"iterations"
:
1000
,
"real_time"
:
0.4
,
"cpu_time"
:
0.5
,
"time_unit"
:
"s"
},
{
"name"
:
"BM_DifferentTimeUnit"
,
"iterations"
:
1
,
"real_time"
:
1
,
"cpu_time"
:
1
,
"time_unit"
:
"s"
},
{
"name"
:
"MyComplexityTest_BigO"
,
"name"
:
"MyComplexityTest_BigO"
,
"run_name"
:
"MyComplexityTest"
,
"run_name"
:
"MyComplexityTest"
,
"run_type"
:
"aggregate"
,
"run_type"
:
"aggregate"
,
...
@@ -114,6 +100,20 @@
...
@@ -114,6 +100,20 @@
"run_type"
:
"aggregate"
,
"run_type"
:
"aggregate"
,
"aggregate_name"
:
"RMS"
,
"aggregate_name"
:
"RMS"
,
"rms"
:
4.5097802512472874e-03
"rms"
:
4.5097802512472874e-03
},
{
"name"
:
"BM_NotBadTimeUnit"
,
"iterations"
:
1000
,
"real_time"
:
0.4
,
"cpu_time"
:
0.5
,
"time_unit"
:
"s"
},
{
"name"
:
"BM_DifferentTimeUnit"
,
"iterations"
:
1
,
"real_time"
:
1
,
"cpu_time"
:
1
,
"time_unit"
:
"s"
}
}
]
]
}
}
tools/gbench/Inputs/test1_run2.json
View file @
df7c7ee1
...
@@ -85,20 +85,6 @@
...
@@ -85,20 +85,6 @@
"time_unit"
:
"ns"
"time_unit"
:
"ns"
},
},
{
{
"name"
:
"BM_BadTimeUnit"
,
"iterations"
:
1000
,
"real_time"
:
0.04
,
"cpu_time"
:
0.6
,
"time_unit"
:
"s"
},
{
"name"
:
"BM_DifferentTimeUnit"
,
"iterations"
:
1
,
"real_time"
:
1
,
"cpu_time"
:
1
,
"time_unit"
:
"ns"
},
{
"name"
:
"MyComplexityTest_BigO"
,
"name"
:
"MyComplexityTest_BigO"
,
"run_name"
:
"MyComplexityTest"
,
"run_name"
:
"MyComplexityTest"
,
"run_type"
:
"aggregate"
,
"run_type"
:
"aggregate"
,
...
@@ -114,6 +100,20 @@
...
@@ -114,6 +100,20 @@
"run_type"
:
"aggregate"
,
"run_type"
:
"aggregate"
,
"aggregate_name"
:
"RMS"
,
"aggregate_name"
:
"RMS"
,
"rms"
:
3.3128901852342174e-03
"rms"
:
3.3128901852342174e-03
},
{
"name"
:
"BM_NotBadTimeUnit"
,
"iterations"
:
1000
,
"real_time"
:
0.04
,
"cpu_time"
:
0.6
,
"time_unit"
:
"s"
},
{
"name"
:
"BM_DifferentTimeUnit"
,
"iterations"
:
1
,
"real_time"
:
1
,
"cpu_time"
:
1
,
"time_unit"
:
"ns"
}
}
]
]
}
}
tools/gbench/report.py
View file @
df7c7ee1
...
@@ -137,7 +137,7 @@ def partition_benchmarks(json1, json2):
...
@@ -137,7 +137,7 @@ def partition_benchmarks(json1, json2):
time_unit
=
x
[
'time_unit'
]
time_unit
=
x
[
'time_unit'
]
break
break
if
time_unit
is
None
:
if
time_unit
is
None
:
break
continue
# Filter by name and time unit.
# Filter by name and time unit.
# All the repetitions are assumed to be comparable.
# All the repetitions are assumed to be comparable.
lhs
=
[
x
for
x
in
json1
[
'benchmarks'
]
if
x
[
'name'
]
==
name
and
lhs
=
[
x
for
x
in
json1
[
'benchmarks'
]
if
x
[
'name'
]
==
name
and
...
@@ -341,7 +341,7 @@ class TestReportDifference(unittest.TestCase):
...
@@ -341,7 +341,7 @@ class TestReportDifference(unittest.TestCase):
[
'BM_10PercentCPUToTime'
,
'+0.1000'
,
[
'BM_10PercentCPUToTime'
,
'+0.1000'
,
'-0.1000'
,
'100'
,
'110'
,
'100'
,
'90'
],
'-0.1000'
,
'100'
,
'110'
,
'100'
,
'90'
],
[
'BM_ThirdFaster'
,
'-0.3333'
,
'-0.3334'
,
'100'
,
'67'
,
'100'
,
'67'
],
[
'BM_ThirdFaster'
,
'-0.3333'
,
'-0.3334'
,
'100'
,
'67'
,
'100'
,
'67'
],
[
'BM_BadTimeUnit'
,
'-0.9000'
,
'+0.2000'
,
'0'
,
'0'
,
'0'
,
'1'
],
[
'BM_
Not
BadTimeUnit'
,
'-0.9000'
,
'+0.2000'
,
'0'
,
'0'
,
'0'
,
'1'
],
]
]
json1
,
json2
=
self
.
load_results
()
json1
,
json2
=
self
.
load_results
()
output_lines_with_header
=
generate_difference_report
(
output_lines_with_header
=
generate_difference_report
(
...
...
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