Skip to content

Commit

Permalink
Add support for excluded tasks in chart_generator
Browse files Browse the repository at this point in the history
Relates: elastic#844
  • Loading branch information
ebadyano committed Jan 9, 2020
1 parent eeba60a commit c376fde
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions esrally/chart_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1505,9 +1505,12 @@ def generate_dashboard(chart_type, environment, track, charts, flavor=None):
}


class RaceConfig:
class RaceConfig:
def __init__(self, track, cfg=None, flavor=None, es_license=None, challenge=None, car=None, node_count=None, charts=None):
self.track = track
self.excluded_tasks = []
if cfg.get("exclude-tasks") is not None:
self.excluded_tasks = cfg.get("exclude-tasks").split(",")
if cfg:
self.configuration = cfg
self.configuration["flavor"] = flavor
Expand Down Expand Up @@ -1562,7 +1565,8 @@ def bulk_tasks(self):
for task in self.track.find_challenge_or_default(self.challenge).schedule:
for sub_task in task:
if sub_task.operation.type == track.OperationType.Bulk.name:
task_names.append(sub_task.name)
if sub_task.name not in self.excluded_tasks:
task_names.append(sub_task.name)
return task_names

@property
Expand All @@ -1572,7 +1576,8 @@ def throttled_tasks(self):
for sub_task in task:
# We are assuming here that each task with a target throughput or target interval is interesting for latency charts.
if "target-throughput" in sub_task.params or "target-interval" in sub_task.params:
task_names.append(sub_task.name)
if sub_task.name not in self.excluded_tasks:
task_names.append(sub_task.name)
return task_names


Expand Down

0 comments on commit c376fde

Please sign in to comment.