Skip to content

Commit

Permalink
Store ES major version as dedicated result field
Browse files Browse the repository at this point in the history
Relates #283
  • Loading branch information
danielmitterdorfer committed May 16, 2017
1 parent 464c51f commit 35cb4e6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion esrally/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import certifi
import tabulate
from esrally import time, exceptions, config, version, paths
from esrally.utils import console, io
from esrally.utils import console, io, versions

logger = logging.getLogger("rally.metrics")

Expand Down Expand Up @@ -1031,6 +1031,7 @@ def to_result_dicts(self):
"environment": self.environment_name,
"trial-timestamp": time.to_iso8601(self.trial_timestamp),
"distribution-version": self.cluster.distribution_version,
"distribution-major-version": versions.major_version(self.cluster.distribution_version),
"user-tag": self.user_tag,
"track": self.track_name,
"challenge": self.challenge_name,
Expand Down
3 changes: 3 additions & 0 deletions esrally/resources/results-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@
"distribution-version": {
"type": "keyword"
},
"distribution-major-version": {
"type": "short"
},
"operation": {
"type": "keyword"
},
Expand Down
3 changes: 3 additions & 0 deletions tests/metrics_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,7 @@ def test_store_results(self):
"environment": "unittest",
"trial-timestamp": "20160131T000000Z",
"distribution-version": "5.0.0",
"distribution-major-version": 5,
"user-tag": "let-me-test",
"track": "unittest-track",
"challenge": "index",
Expand All @@ -703,6 +704,7 @@ def test_store_results(self):
"environment": "unittest",
"trial-timestamp": "20160131T000000Z",
"distribution-version": "5.0.0",
"distribution-major-version": 5,
"user-tag": "let-me-test",
"track": "unittest-track",
"challenge": "index",
Expand All @@ -721,6 +723,7 @@ def test_store_results(self):
"environment": "unittest",
"trial-timestamp": "20160131T000000Z",
"distribution-version": "5.0.0",
"distribution-major-version": 5,
"user-tag": "let-me-test",
"track": "unittest-track",
"challenge": "index",
Expand Down

0 comments on commit 35cb4e6

Please sign in to comment.