-
Notifications
You must be signed in to change notification settings - Fork 10.5k
BenchmarkDriver Strangler replaces Benchmark_Driver run #18924
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0d64386
049ffb3
1d3fa87
a10b607
ef1461c
7ae5d77
6bddcbe
49e8e69
13c4993
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,10 +13,20 @@ | |
# | ||
# ===---------------------------------------------------------------------===// | ||
""" | ||
This script is used for comparing performance test results. | ||
This script compares performance test logs and issues a formatted report. | ||
|
||
Invoke `$ compare_perf_tests.py -h ` for complete list of options. | ||
|
||
class `Sample` is single benchmark measurement. | ||
class `PerformanceTestSamples` is collection of `Sample`s and their statistics. | ||
class `PerformanceTestResult` is a summary of performance test execution. | ||
class `LogParser` converts log files into `PerformanceTestResult`s. | ||
class `ResultComparison` compares new and old `PerformanceTestResult`s. | ||
class `TestComparator` analyzes changes betweeen the old and new test results. | ||
class `ReportFormatter` creates the test comparison report in specified format. | ||
|
||
It is structured into several classes that can be imported into other modules. | ||
""" | ||
|
||
from __future__ import print_function | ||
|
||
import argparse | ||
|
@@ -48,7 +58,7 @@ class PerformanceTestSamples(object): | |
""" | ||
|
||
def __init__(self, name, samples=None): | ||
"""Initialized with benchmark name and optional list of Samples.""" | ||
"""Initialize with benchmark name and optional list of Samples.""" | ||
self.name = name # Name of the performance test | ||
self.samples = [] | ||
self.outliers = [] | ||
|
@@ -201,7 +211,7 @@ class PerformanceTestResult(object): | |
""" | ||
|
||
def __init__(self, csv_row): | ||
"""Initialized from a row with 8 or 9 columns with benchmark summary. | ||
"""Initialize from a row with 8 or 9 columns with benchmark summary. | ||
|
||
The row is an iterable, such as a row provided by the CSV parser. | ||
""" | ||
|
@@ -298,7 +308,7 @@ def _reset(self): | |
|
||
# Parse lines like this | ||
# #,TEST,SAMPLES,MIN(μs),MAX(μs),MEAN(μs),SD(μs),MEDIAN(μs) | ||
results_re = re.compile(r'(\d+[, \t]*\w+[, \t]*' + | ||
results_re = re.compile(r'([ ]*\d+[, \t]*\w+[, \t]*' + | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nitpick: brackets are not required around the single space There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did not know that space and a star would work. This way it is in same style as all the other repeated groups. Do you want me to change it? |
||
r'[, \t]*'.join([r'[\d.]+'] * 6) + | ||
r'[, \t]*[\d.]*)') # optional MAX_RSS(B) | ||
|
||
|
@@ -409,7 +419,7 @@ class TestComparator(object): | |
""" | ||
|
||
def __init__(self, old_results, new_results, delta_threshold): | ||
"""Initialized with dictionaries of old and new benchmark results. | ||
"""Initialize with dictionaries of old and new benchmark results. | ||
|
||
Dictionary keys are benchmark names, values are | ||
`PerformanceTestResult`s. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's an important change. It should be in a separate commit or at least be mentioned in the commit message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m not sure what you mean. Deterministic hashing env variable was added some 5 months ago by @lorentey. I’ve just added a unit test for it and moved the implementation into
BenchmarkDriver
class.