Skip to content

Commit

Permalink
Drop relative-time-ms metric
Browse files Browse the repository at this point in the history
With this commit we drop the metric `relative-time-ms` which we have
introduced for a transition period. This property is superseded by
`relative-time` which contains the same value.

Relates elastic#1198
  • Loading branch information
danielmitterdorfer authored and pquentin committed Jun 30, 2021
1 parent 13a55d0 commit 6e4c9a2
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 25 deletions.
11 changes: 0 additions & 11 deletions docs/metrics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Here is a typical metrics record::
"race-timestamp": "20160421T042749Z",
"race-id": "6ebc6e53-ee20-4b0c-99b4-09697987e9f4",
"@timestamp": 1461213093093,
"relative-time-ms": 10507.328,
"relative-time": 10507.328,
"track": "geonames",
"track-params": {
Expand Down Expand Up @@ -79,16 +78,6 @@ A UUID that changes on every invocation of Rally. It is intended to group all sa

The timestamp in milliseconds since epoch determined when the sample was taken. For request-related metrics, such as ``latency`` or ``service_time`` this is the timestamp when Rally has issued the request.

relative-time-ms
~~~~~~~~~~~~~~~~

.. warning::

This property has been introduced for a transition period between Rally 2.1.0 and Rally 2.3.0. It is deprecated with Rally 2.2.1 and will be removed in Rally 2.3.0. Use ``relative-time`` instead.


The relative time in milliseconds since the start of the benchmark. This is useful for comparing time-series graphs over multiple races, e.g. you might want to compare the indexing throughput over time across multiple races. As they should always start at the same (relative) point in time, absolute timestamps are not helpful.

relative-time
~~~~~~~~~~~~~

Expand Down
13 changes: 13 additions & 0 deletions docs/migrate.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
Migration Guide
===============

Migrating to Rally 2.3.0
------------------------

``relative-time-ms`` is removed
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. note::

This removal is only relevant if you have configured an Elasticsearch metrics store for Rally.

The deprecated property ``relative-time-ms`` has been removed in Rally 2.3.0. Use the property ``relative-time`` instead to retrieve the same metric.


Migrating to Rally 2.2.1
------------------------

Expand Down
1 change: 0 additions & 1 deletion docs/recipes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ The number of hits from queries can also be investigated if you have configured

{
"@timestamp" : 1597681313435,
"relative-time-ms" : 130273.374,
"relative-time" : 130273.374,
"race-id" : "452ad9d7-9c21-4828-848e-89974af3230e",
"race-timestamp" : "20200817T160412Z",
Expand Down
4 changes: 0 additions & 4 deletions esrally/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,8 +606,6 @@ def _put_metric(

doc = {
"@timestamp": time.to_epoch_millis(absolute_time),
# deprecated
"relative-time-ms": convert.seconds_to_ms(relative_time),
"relative-time": convert.seconds_to_ms(relative_time),
"race-id": self._race_id,
"race-timestamp": self._race_timestamp,
Expand Down Expand Up @@ -666,8 +664,6 @@ def put_doc(self, doc, level=None, node_name=None, meta_data=None, absolute_time
doc.update(
{
"@timestamp": time.to_epoch_millis(absolute_time),
# deprecated
"relative-time-ms": convert.seconds_to_ms(relative_time),
"relative-time": convert.seconds_to_ms(relative_time),
"race-id": self._race_id,
"race-timestamp": self._race_timestamp,
Expand Down
3 changes: 0 additions & 3 deletions esrally/resources/metrics-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
"type": "date",
"format": "epoch_millis"
},
"relative-time-ms": {
"type": "float"
},
"relative-time": {
"type": "float"
},
Expand Down
6 changes: 0 additions & 6 deletions tests/metrics_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ def test_put_value_without_meta_info(self):
"@timestamp": StaticClock.NOW * 1000,
"race-id": EsMetricsTests.RACE_ID,
"race-timestamp": "20160131T000000Z",
"relative-time-ms": 0,
"relative-time": 0,
"environment": "unittest",
"sample-type": "normal",
Expand Down Expand Up @@ -350,7 +349,6 @@ def test_put_value_with_explicit_timestamps(self):
"@timestamp": 0,
"race-id": EsMetricsTests.RACE_ID,
"race-timestamp": "20160131T000000Z",
"relative-time-ms": 10000,
"relative-time": 10000,
"environment": "unittest",
"sample-type": "normal",
Expand Down Expand Up @@ -387,7 +385,6 @@ def test_put_value_with_meta_info(self):
"@timestamp": StaticClock.NOW * 1000,
"race-id": EsMetricsTests.RACE_ID,
"race-timestamp": "20160131T000000Z",
"relative-time-ms": 0,
"relative-time": 0,
"environment": "unittest",
"sample-type": "normal",
Expand Down Expand Up @@ -426,7 +423,6 @@ def test_put_doc_no_meta_data(self):
"@timestamp": StaticClock.NOW * 1000,
"race-id": EsMetricsTests.RACE_ID,
"race-timestamp": "20160131T000000Z",
"relative-time-ms": 0,
"relative-time": 0,
"environment": "unittest",
"track": "test",
Expand Down Expand Up @@ -473,7 +469,6 @@ def test_put_doc_with_metadata(self):
"@timestamp": StaticClock.NOW * 1000,
"race-id": EsMetricsTests.RACE_ID,
"race-timestamp": "20160131T000000Z",
"relative-time-ms": 0,
"relative-time": 0,
"environment": "unittest",
"track": "test",
Expand Down Expand Up @@ -1899,7 +1894,6 @@ def test_add_administrative_task_with_error_rate_in_report(self):
self.metrics_store.put_doc(
doc={
"@timestamp": 1595896761994,
"relative-time-ms": 283.382,
"relative-time": 283.382,
"race-id": "fb26018b-428d-4528-b36b-cf8c54a303ec",
"race-timestamp": "20200728T003905Z",
Expand Down

0 comments on commit 6e4c9a2

Please sign in to comment.