Skip to content

Commit

Permalink
Add timestamps as meta-info in index recovery (elastic#1019)
Browse files Browse the repository at this point in the history
With this commit we include the start and stop timestamp as meta-info in
the index recovery runner. This can be useful to correlate the
timestamps to additional diagnostic data (e.g. GC logs or system
metrics).
  • Loading branch information
danielmitterdorfer authored Jun 17, 2020
1 parent fadc065 commit cd0ebf8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion esrally/driver/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -1548,7 +1548,9 @@ async def __call__(self, es, params):
"unit": "byte",
"success": True,
"service_time": response_time_in_seconds,
"time_period": response_time_in_seconds
"time_period": response_time_in_seconds,
"start_time_millis": total_start_millis,
"stop_time_millis": total_end_millis
}

def __repr__(self, *args, **kwargs):
Expand Down
2 changes: 2 additions & 0 deletions tests/driver/runner_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3012,6 +3012,8 @@ async def test_waits_for_ongoing_indices_recovery(self, es):
# 5 seconds
self.assertEqual(5, result["service_time"])
self.assertEqual(5, result["time_period"])
self.assertEqual(1393244155000, result["start_time_millis"])
self.assertEqual(1393244160000, result["stop_time_millis"])

es.indices.recovery.assert_called_with(index="index1")
# retries four times
Expand Down

0 comments on commit cd0ebf8

Please sign in to comment.