Skip to content
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

Show processing time also in comparison reports #1045

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions esrally/reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,8 @@ def __init__(self, config):
self.report_file = config.opts("reporting", "output.path")
self.report_format = config.opts("reporting", "format")
self.cwd = config.opts("node", "rally.cwd")
self.show_processing_time = convert.to_bool(config.opts("reporting", "output.processingtime",
mandatory=False, default_value=False))
self.plain = False

def report(self, r1, r2):
Expand Down Expand Up @@ -360,6 +362,8 @@ def metrics_table(self, baseline_stats, contender_stats, plain):
metrics_table.extend(self.report_throughput(baseline_stats, contender_stats, t))
metrics_table.extend(self.report_latency(baseline_stats, contender_stats, t))
metrics_table.extend(self.report_service_time(baseline_stats, contender_stats, t))
if self.show_processing_time:
metrics_table.extend(self.report_processing_time(baseline_stats, contender_stats, t))
metrics_table.extend(self.report_error_rate(baseline_stats, contender_stats, t))
return metrics_table

Expand Down Expand Up @@ -394,6 +398,11 @@ def report_service_time(self, baseline_stats, contender_stats, task):
contender_service_time = contender_stats.metrics(task)["service_time"]
return self.report_percentiles("service time", task, baseline_service_time, contender_service_time)

def report_processing_time(self, baseline_stats, contender_stats, task):
baseline_processing_time = baseline_stats.metrics(task)["processing_time"]
contender_processing_time = contender_stats.metrics(task)["processing_time"]
return self.report_percentiles("processing time", task, baseline_processing_time, contender_processing_time)

def report_percentiles(self, name, task, baseline_values, contender_values):
lines = []
for percentile in metrics.percentiles_for_sample_size(sys.maxsize):
Expand Down