Skip to content

Commit

Permalink
Change compare args from timestamp to ID.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennis Lawler committed Jul 11, 2019
1 parent c8f0d82 commit 4131665
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions esrally/rally.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@ def positive_number(v):
compare_parser.add_argument(
"--baseline",
required=True,
help="Race timestamp of the baseline (see %s list races)." % PROGRAM_NAME)
help="Race ID of the baseline (see %s list races)." % PROGRAM_NAME)
compare_parser.add_argument(
"--contender",
required=True,
help="Race timestamp of the contender (see %s list races)." % PROGRAM_NAME)
help="Race ID of the contender (see %s list races)." % PROGRAM_NAME)
compare_parser.add_argument(
"--report-format",
help="Define the output format for the command line report (default: markdown).",
Expand Down Expand Up @@ -634,8 +634,8 @@ def main():
cfg.add(config.Scope.applicationOverride, "reporting", "values", args.show_in_report)
cfg.add(config.Scope.applicationOverride, "reporting", "output.path", args.report_file)
if sub_command == "compare":
cfg.add(config.Scope.applicationOverride, "reporting", "baseline.timestamp", args.baseline)
cfg.add(config.Scope.applicationOverride, "reporting", "contender.timestamp", args.contender)
cfg.add(config.Scope.applicationOverride, "reporting", "baseline.id", args.baseline)
cfg.add(config.Scope.applicationOverride, "reporting", "contender.id", args.contender)
if sub_command == "generate":
cfg.add(config.Scope.applicationOverride, "generator", "chart.type", args.chart_type)
cfg.add(config.Scope.applicationOverride, "generator", "output.path", args.output_path)
Expand Down
10 changes: 5 additions & 5 deletions esrally/reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ def summarize(race, cfg, lap=None):


def compare(cfg):
baseline_ts = cfg.opts("reporting", "baseline.timestamp")
contender_ts = cfg.opts("reporting", "contender.timestamp")
baseline_id = cfg.opts("reporting", "baseline.id")
contender_id = cfg.opts("reporting", "contender.id")

if not baseline_ts or not contender_ts:
if not baseline_id or not contender_id:
raise exceptions.SystemSetupError("compare needs baseline and a contender")
race_store = metrics.race_store(cfg)
ComparisonReporter(cfg).report(
race_store.find_by_timestamp(baseline_ts),
race_store.find_by_timestamp(contender_ts))
race_store.find_by_trial_id(baseline_id),
race_store.find_by_trial_id(contender_id))


def print_internal(message):
Expand Down

0 comments on commit 4131665

Please sign in to comment.