Skip to content

Commit

Permalink
Update eventdata track for Rally 0.9.0 (#6)
Browse files Browse the repository at this point in the history
With this commit we update the eventdata track to match Rally's updated
track syntax:

* Replace "index" operation with "bulk"
* Remove runners that are now in Rally core
* Move index-settings to new create-index operation
* Update indices definition
  • Loading branch information
danielmitterdorfer committed Mar 13, 2018
1 parent dbb2aa7 commit aff4786
Show file tree
Hide file tree
Showing 13 changed files with 151 additions and 123 deletions.
16 changes: 12 additions & 4 deletions eventdata/challenges/bulk-size-evaluation.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
{
"name": "bulk-size-evaluation",
"description": "Indexes with different bulk sizes. IDs are autogenerated by Elasticsearch, meaning there are no conflicts.",
"index-settings": {
"index.number_of_replicas": {{ replica_count }},
"index.number_of_shards": {{ shard_count }}
},
"meta": {
"client_count": {{ clients }},
"benchmark_type": "indexing_bulksize"
},
"schedule": [
{
"operation": "delete-index"
},
{
"operation": {
"operation-type": "create-index",
"settings": {
"index.number_of_replicas": {{ replica_count }},
"index.number_of_shards": {{ shard_count }}
}
}
},
{
"operation": "index-append-125",
"warmup-time-period": 0,
Expand Down
42 changes: 14 additions & 28 deletions eventdata/challenges/combined-indexing-and-querying.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,41 +7,27 @@
},
"schedule": [
{
"operation": "deleteindex_elasticlogs_i-*",
"iterations": 1
"operation": "deleteindex_elasticlogs_i-*"
},
{
"operation": "fieldstats_elasticlogs_q-*_ELASTICLOGS",
"iterations": 1
"operation": "fieldstats_elasticlogs_q-*_ELASTICLOGS"
},
{
"parallel": {
"warmup-iterations": 0,
"iterations": 200,
"tasks": [
{
"operation": "relative-kibana-content_issues-dashboard_75%",
"meta": {
"query_type": "warmup"
}
}
]
"operation": "relative-kibana-content_issues-dashboard_75%",
"warmup-iterations": 0,
"iterations": 200,
"meta": {
"query_type": "warmup"
}
},
{
"parallel": {
"warmup-time-period": 0,
"time-period": {{ rate_limit_duration_secs }},
"tasks": [
{
"operation": "relative-kibana-content_issues-dashboard_50%",
"target-interval": 60,
"meta": {
"target_indexing_rate": 0,
"query_type": "historic"
}
}
]
"operation": "relative-kibana-content_issues-dashboard_50%",
"target-interval": 60,
"warmup-time-period": 0,
"time-period": {{ rate_limit_duration_secs }},
"meta": {
"target_indexing_rate": 0,
"query_type": "historic"
}
},
{
Expand Down
20 changes: 14 additions & 6 deletions eventdata/challenges/shard-size-on-disk.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
{
"name": "shard-size-on-disk",
"description": "Indexes sets of 2M events into Elasticsearch, followed by index statistics in order to track how index size depends on event count. IDs are autogenerated by Elasticsearch, meaning there are no conflicts. This process is repeatedly run until 100M events have been indexed into the shard.",
"index-settings": {
"index.number_of_replicas": 0,
"index.number_of_shards": 1,
"index.refresh_interval": "5s",
"index.codec": "best_compression"
},
"meta": {
"benchmark_type": "shard-size-on-disk"
},
"schedule": [
{
"operation": "delete-index"
},
{
"operation": {
"operation-type": "create-index",
"settings": {
"index.number_of_replicas": 0,
"index.number_of_shards": 1,
"index.refresh_interval": "5s",
"index.codec": "best_compression"
}
}
},
{% for n in range(1,50) %}
{
"name": "index-append-1000-shard-sizing-{{n}}",
Expand Down
20 changes: 14 additions & 6 deletions eventdata/challenges/shard-sizing.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
{
"name": "shard-sizing",
"description": "Indexes sets of 2M events into Elasticsearch, followed by index statistics and simulated Kibana queries. IDs are autogenerated by Elasticsearch, meaning there are no conflicts. This process is repeatedly run until 50M events have been indexed into the shard. This allows query latency to be evaluated as a function of shard size.",
"index-settings": {
"index.number_of_replicas": 0,
"index.number_of_shards": 1,
"index.refresh_interval": "5s",
"index.codec": "best_compression"
},
"meta": {
"benchmark_type": "shard-sizing"
},
"schedule": [
{
"operation": "delete-index"
},
{
"operation": {
"operation-type": "create-index",
"settings": {
"index.number_of_replicas": 0,
"index.number_of_shards": 1,
"index.refresh_interval": "5s",
"index.codec": "best_compression"
}
}
},
{% for n in range(1,shard_sizing_iterations) %}
{
"name": "index-append-1000-shard-sizing-iteration-{{n}}",
Expand Down
45 changes: 45 additions & 0 deletions eventdata/elasticlogs-index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"mappings": {
"logs": {
"properties": {
"@timestamp": { "type": "date" },
"message": { "type": "text", "index": false },
"agent": { "type": "keyword", "ignore_above": 256 },
"bytes": { "type": "integer" },
"clientip": { "type": "ip" },
"httpversion": { "type": "keyword", "ignore_above": 256 },
"response": { "type": "short" },
"verb": { "type": "keyword", "ignore_above": 256 },
"tags": { "type": "keyword", "ignore_above": 256 },
"geoip" : {
"properties" : {
"country_name" : { "type": "keyword" },
"location" : { "type": "geo_point" }
}
},
"useragent": {
"properties": {
"name": { "type": "keyword", "ignore_above": 256 },
"os": { "type": "keyword", "ignore_above": 256 },
"os_name": { "type": "keyword", "ignore_above": 256 }
}
},
"request": {
"norms": false,
"type": "text",
"fields": {
"keyword": { "ignore_above": 256, "type": "keyword" }
}
},
"referrer": {
"norms": false,
"type": "text",
"fields": {
"keyword": { "ignore_above": 256, "type": "keyword" }
}
}
},
"_all": { "enabled": false }
}
}
}
10 changes: 5 additions & 5 deletions eventdata/operations/generate-historic-data.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "load_elasticlogs_snapshot_template",
"operation-type": "load_template",
"index_template_body": {
"operation-type": "create-index-template",
"template": "elasticlogs-historic",
"body": {
"template": "elasticlogs-h-*",
"settings": {
"index.refresh_interval": "10s",
Expand All @@ -13,12 +14,11 @@
{% include "mappings.json" %}
,
"aliases": {}
},
"index_template_name": "elasticlogs-historic"
}
},
{
"name": "index_6x_speed",
"operation-type": "index",
"operation-type": "bulk",
"param-source": "elasticlogs_bulk",
"index": "elasticlogs-h-<yyyy>-<mm>-<dd>",
"daily_index": true,
Expand Down
28 changes: 14 additions & 14 deletions eventdata/operations/indexing.json
Original file line number Diff line number Diff line change
@@ -1,60 +1,60 @@
{
"name": "index-append-50000",
"operation-type": "index",
"operation-type": "bulk",
"param-source": "elasticlogs_bulk",
"bulk-size": 50000
},
{
"name": "index-append-20000",
"operation-type": "index",
"operation-type": "bulk",
"param-source": "elasticlogs_bulk",
"bulk-size": 20000
},
{
"name": "index-append-10000",
"operation-type": "index",
"operation-type": "bulk",
"param-source": "elasticlogs_bulk",
"bulk-size": 10000
},
{
"name": "index-append-5000",
"operation-type": "index",
"operation-type": "bulk",
"param-source": "elasticlogs_bulk",
"bulk-size": 5000
},
{
"name": "index-append-2000",
"operation-type": "index",
"operation-type": "bulk",
"param-source": "elasticlogs_bulk",
"bulk-size": 2000
},
{
"name": "index-append-1000",
"operation-type": "index",
"operation-type": "bulk",
"param-source": "elasticlogs_bulk",
"bulk-size": 1000
},
{
"name": "index-append-500",
"operation-type": "index",
"operation-type": "bulk",
"param-source": "elasticlogs_bulk",
"bulk-size": 500
},
{
"name": "index-append-250",
"operation-type": "index",
"operation-type": "bulk",
"param-source": "elasticlogs_bulk",
"bulk-size": 250
},
{
"name": "index-append-125",
"operation-type": "index",
"operation-type": "bulk",
"param-source": "elasticlogs_bulk",
"bulk-size": 125
},
{
"name": "index-append-1000-shard-sizing",
"operation-type": "index",
"operation-type": "bulk",
"param-source": "elasticlogs_bulk",
"index": "elasticlogs",
"starting_point": "2017-01-01:02:00:00",
Expand All @@ -63,14 +63,14 @@
},
{
"name": "index-append-1000-elasticlogs_q_write",
"operation-type": "index",
"operation-type": "bulk",
"param-source": "elasticlogs_bulk",
"index": "elasticlogs_q_write",
"bulk-size": 1000
},
{
"name": "index-append-1000-elasticlogs_i_write",
"operation-type": "index",
"operation-type": "bulk",
"param-source": "elasticlogs_bulk",
"index": "elasticlogs_i_write",
"bulk-size": 1000
Expand Down Expand Up @@ -183,6 +183,6 @@
},
{
"name": "deleteindex_elasticlogs_i-*",
"operation-type": "deleteindex",
"index_pattern": "elasticlogs_i-*"
"operation-type": "delete-index",
"index": "elasticlogs_i-*"
}
14 changes: 7 additions & 7 deletions eventdata/parameter_sources/elasticlogs_bulk_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ class ElasticlogsBulkSource:
'2016-12-20 20:12:32' and an acceleration factor of 2.0, events will be generated in timestamp
sequence covering a 2-hour window, '2017-02-20 20:12:32' to '2017-02-20 22:12:32' (approximately).
"""
def __init__(self, indices, params):
self._indices = indices
def __init__(self, track, params, **kwargs):
self._indices = track.indices
self._params = params
self._randomevent = RandomEvent(params)

Expand All @@ -56,19 +56,19 @@ def __init__(self, indices, params):

self._default_index = False
if 'index' not in params.keys():
if len(indices) > 1:
logger.debug("[bulk] More than one index specified in track configuration. Will use the first one ({})".format(indices[0].name))
if len(self._indices) > 1:
logger.debug("[bulk] More than one index specified in track configuration. Will use the first one ({})".format(self._indices[0].name))
else:
logger.debug("[bulk] Using index specified in track configuration ({})".format(indices[0].name))
logger.debug("[bulk] Using index specified in track configuration ({})".format(self._indices[0].name))

self._params['index'] = indices[0].name
self._params['index'] = self._indices[0].name
self._default_index = True

else:
logger.debug("[bulk] Index pattern specified in parameters ({}) will be used".format(params['index']))

if 'type' not in params.keys():
self._params['type'] = indices[0].types[0].name
self._params['type'] = self._indices[0].types[0].name

def partition(self, partition_index, total_partitions):
return self
Expand Down
3 changes: 1 addition & 2 deletions eventdata/parameter_sources/elasticlogs_kibana_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ class ElasticlogsKibanaSource:
'4d' - Consists of a number and either m (minutes), h (hours) or d (days). Can not be lower than 1 minute.
'10%' - Length given as percentage of window size. Only available when fieldstats_id have been specified.
"""
def __init__(self, indices, params):
self._indices = indices
def __init__(self, track, params, **kwargs):
self._params = params
self._index_pattern = 'elasticlogs-*'
self._query_string_list = ['*']
Expand Down
14 changes: 7 additions & 7 deletions eventdata/parameter_sources/sample_based_bulk_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ class SampleBasedBulkSource:
not supported) are to be replaced by the event timestamp. If no timestamp is to be added or modified,
this parameter can be left out.
"""
def __init__(self, indices, params):
self._indices = indices
def __init__(self, track, params, **kwargs):
self._indices = track.indices
self._params = params
self._samples = []
self._next_index = 0
Expand All @@ -88,19 +88,19 @@ def __init__(self, indices, params):

self._default_index = False
if 'index' not in params.keys():
if len(indices) > 1:
logger.debug("[bulk] More than one index specified in track configuration. Will use the first one ({})".format(indices[0].name))
if len(self._indices) > 1:
logger.debug("[bulk] More than one index specified in track configuration. Will use the first one ({})".format(self._indices[0].name))
else:
logger.debug("[bulk] Using index specified in track configuration ({})".format(indices[0].name))
logger.debug("[bulk] Using index specified in track configuration ({})".format(self._indices[0].name))

self._params['index'] = indices[0].name
self._params['index'] = self._indices[0].name
self._default_index = True

else:
logger.debug("[bulk] Index pattern specified in parameters ({}) will be used".format(params['index']))

if 'type' not in params.keys():
self._params['type'] = indices[0].types[0].name
self._params['type'] = self._indices[0].types[0].name

if 'timestamp_field' not in params.keys():
self._params['timestamp_field'] = []
Expand Down
Loading

0 comments on commit aff4786

Please sign in to comment.