Skip to content

Commit

Permalink
Record indexing throttle time
Browse files Browse the repository at this point in the history
Closes #376
  • Loading branch information
danielmitterdorfer committed Dec 5, 2017
1 parent b43690d commit 425d8f6
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/metrics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ Rally stores the following metrics:
* ``merges_total_time``: Total runtime of merges as reported by the indices stats API. Note that this is not Wall clock time (i.e. if M merge threads ran for N minutes, we will report M * N minutes, not N minutes).
* ``merges_total_throttled_time``: Total time within merges have been throttled as reported by the indices stats API. Note that this is not Wall clock time.
* ``indexing_total_time``: Total time used for indexing as reported by the indices stats API. Note that this is not Wall clock time.
* ``indexing_throttle_time``: Total time that indexing has been throttled as reported by the indices stats API. Note that this is not Wall clock time.
* ``refresh_total_time``: Total time used for index refresh as reported by the indices stats API. Note that this is not Wall clock time.
* ``flush_total_time``: Total time used for index flush as reported by the indices stats API. Note that this is not Wall clock time.
* ``final_index_size_bytes``: Final resulting index size after the benchmark.
6 changes: 6 additions & 0 deletions docs/summary_report.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ Indexing time
* **Definition**: Total time used for indexing as reported by the indices stats API. Note that this is not Wall clock time (i.e. if M indexing threads ran for N minutes, we will report M * N minutes, not N minutes).
* **Corresponding metrics key**: ``indexing_total_time``

Indexing throttle time
----------------------

* **Definition**: Total time that indexing has been throttled as reported by the indices stats API. Note that this is not Wall clock time (i.e. if M indexing threads ran for N minutes, we will report M * N minutes, not N minutes).
* **Corresponding metrics key**: ``indexing_throttle_time``

Merge time
----------

Expand Down
1 change: 1 addition & 0 deletions esrally/mechanic/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,7 @@ def index_times(self, p):
"merges_total_time": self.extract_value(p, ["merges", "total_time_in_millis"], default_value=0),
"merges_total_throttled_time": self.extract_value(p, ["merges", "total_throttled_time_in_millis"], default_value=0),
"indexing_total_time": self.extract_value(p, ["indexing", "index_time_in_millis"], default_value=0),
"indexing_throttle_time": self.extract_value(p, ["indexing", "throttle_time_in_millis"], default_value=0),
"refresh_total_time": self.extract_value(p, ["refresh", "total_time_in_millis"], default_value=0),
"flush_total_time": self.extract_value(p, ["flush", "total_time_in_millis"], default_value=0)
}
Expand Down
5 changes: 5 additions & 0 deletions esrally/reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ def __call__(self):

logger.debug("Gathering indexing metrics.")
result.total_time = self.sum("indexing_total_time")
result.indexing_throttle_time = self.sum("indexing_throttle_time")
result.merge_time = self.sum("merges_total_time")
result.refresh_time = self.sum("refresh_total_time")
result.flush_time = self.sum("flush_total_time")
Expand Down Expand Up @@ -224,6 +225,7 @@ class Stats:
def __init__(self, d=None):
self.op_metrics = self.v(d, "op_metrics", default=[])
self.total_time = self.v(d, "total_time")
self.indexing_throttle_time = self.v(d, "indexing_throttle_time")
self.merge_time = self.v(d, "merge_time")
self.refresh_time = self.v(d, "refresh_time")
self.flush_time = self.v(d, "flush_time")
Expand Down Expand Up @@ -434,6 +436,7 @@ def report_total_times(self, stats):
unit = "min"
return self.join(
self.line("Indexing time", "", stats.total_time, unit, convert.ms_to_minutes),
self.line("Indexing throttle time", "", stats.indexing_throttle_time, unit, convert.ms_to_minutes),
self.line("Merge time", "", stats.merge_time, unit, convert.ms_to_minutes),
self.line("Refresh time", "", stats.refresh_time, unit, convert.ms_to_minutes),
self.line("Flush time", "", stats.flush_time, unit, convert.ms_to_minutes),
Expand Down Expand Up @@ -634,6 +637,8 @@ def report_total_times(self, baseline_stats, contender_stats):
return self.join(
self.line("Indexing time", baseline_stats.total_time, contender_stats.total_time, "", "min",
treat_increase_as_improvement=False, formatter=convert.ms_to_minutes),
self.line("Indexing throttle time", baseline_stats.indexing_throttle_time, contender_stats.indexing_throttle_time, "", "min",
treat_increase_as_improvement=False, formatter=convert.ms_to_minutes),
self.line("Merge time", baseline_stats.merge_time, contender_stats.merge_time, "", "min",
treat_increase_as_improvement=False, formatter=convert.ms_to_minutes),
self.line("Refresh time", baseline_stats.refresh_time, contender_stats.refresh_time, "", "min",
Expand Down

0 comments on commit 425d8f6

Please sign in to comment.