Skip to content

Commit

Permalink
Add support for multi-node benchmarks
Browse files Browse the repository at this point in the history
Relates elastic#22
  • Loading branch information
danielmitterdorfer committed Oct 9, 2017
1 parent c2694b0 commit 9ddc749
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 72 deletions.
10 changes: 8 additions & 2 deletions fixtures/ansible/inventory/production/macrobenchmarks
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@
# ---------------------

[elasticsearch-ci-slaves-macrobenchmarks]
slave-551503.build.hetzner-dc17.elasticnet.co ansible_ssh_private_key_file=/var/lib/jenkins/.ssh/rally ansible_user=rally
# public: slave-746202.build.hetzner-fsn1-dc4.elasticnet.co
192.168.14.2 ansible_ssh_private_key_file=/var/lib/jenkins/.ssh/rally ansible_user=rally


[macrobenchmarks-targets]
target-551504.benchmark.hetzner-dc17.elasticnet.co ansible_ssh_private_key_file=/var/lib/jenkins/.ssh/rally ansible_user=rally
# target-746203.benchmark.hetzner-fsn1-dc4.elasticnet.co
192.168.14.3 ansible_ssh_private_key_file=/var/lib/jenkins/.ssh/rally ansible_user=rally
# target-746204.benchmark.hetzner-fsn1-dc4.elasticnet.co
192.168.14.4 ansible_ssh_private_key_file=/var/lib/jenkins/.ssh/rally ansible_user=rally
# target-746205.benchmark.hetzner-fsn1-dc4.elasticnet.co
192.168.14.5 ansible_ssh_private_key_file=/var/lib/jenkins/.ssh/rally ansible_user=rally

[macrobenchmarks-targets:children]
32 changes: 17 additions & 15 deletions generate_release_charts.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ def tracks_for_index():
if combination.get("release-charts", True):
challenge = combination["challenge"]
car = combination["car"]
node_count = int(combination.get("node-count", 1))
index_op = find_challenge(challenges_of_track, challenge)["schedule"][0]["operation"]
cci.append((challenge, car, index_op))
cci.append((challenge, car, node_count, index_op))
all_tracks.append((track, cci))
return all_tracks

Expand All @@ -40,12 +41,12 @@ def tracks_for_index():

filters = ""
for idx, item in enumerate(cci):
challenge, car, index_op = item
challenge, car, node_count, index_op = item
if idx > 0:
filters = filters + ","
label = "%s-%s" % (challenge, car)
filters = filters + "{\"input\":{\"query\":{\"query_string\":{\"analyze_wildcard\":true,\"query\":\"operation:%s AND challenge:%s AND car:%s\"}}},\"label\":\"%s\"}" % (
index_op, challenge, car, label)
label = "%s-%s" % (challenge, car) if node_count == 1 else "%s-%s (%d nodes)" % (challenge, car, node_count)
filters = filters + "{\"input\":{\"query\":{\"query_string\":{\"analyze_wildcard\":true,\"query\":\"operation:%s AND challenge:%s AND car:%s AND node-count:%d\"}}},\"label\":\"%s\"}" % (
index_op, challenge, car, node_count, label)

s = {
"_id": str(uuid.uuid4()),
Expand Down Expand Up @@ -90,21 +91,22 @@ def default_tracks(tracks):
track = track_structure["track"]
challenge = combination["challenge"]
car = combination["car"]
node_count = int(combination.get("node-count", 1))
default_challenge = challenges(track)[0]
# default challenge is usually the first one. No need for complex logic
assert default_challenge["default"]
# filter queries
queries = [t["operation"] for t in default_challenge["schedule"] if
not (t["operation"].startswith("index") or t["operation"] in ["force-merge", "node-stats"])]
all_tracks.append((track, challenge, car, queries))
all_tracks.append((track, challenge, car, node_count, queries))

return all_tracks


def generate_queries(tracks):
# output JSON structures
structures = []
for track, challenge, car, queries in default_tracks(tracks):
for track, challenge, car, node_count, queries in default_tracks(tracks):
for q in queries:
title = "release-%s-%s-p99-latency" % (track, q)
label = "Query Latency [ms]"
Expand Down Expand Up @@ -137,8 +139,8 @@ def generate_queries(tracks):
"version": 1,
"kibanaSavedObjectMeta": {
"searchSourceJSON": "{\"index\":\"rally-results-*\",\"query\":{\"query_string\":"
"{\"query\":\"environment:release AND active:true AND track:%s AND name:%s AND operation:%s AND challenge:%s AND car:%s\",\"analyze_wildcard\":true}},\"filter\":[]}" % (
track, metric, q, challenge, car)
"{\"query\":\"environment:release AND active:true AND track:%s AND name:%s AND operation:%s AND challenge:%s AND car:%s AND node-count:%d\",\"analyze_wildcard\":true}},\"filter\":[]}" % (
track, metric, q, challenge, car, node_count)
}
}
}
Expand All @@ -149,7 +151,7 @@ def generate_queries(tracks):
def generate_io(tracks):
# output JSON structures
structures = []
for track, challenge, car, queries in default_tracks(tracks):
for track, challenge, car, node_count, queries in default_tracks(tracks):
title = "release-%s-io" % track

s = {
Expand Down Expand Up @@ -181,8 +183,8 @@ def generate_io(tracks):
"description": "",
"version": 1,
"kibanaSavedObjectMeta": {
"searchSourceJSON": "{\"index\":\"rally-results-*\",\"query\":{\"query_string\":{\"query\":\"environment:release AND active:true AND track:%s AND challenge:%s AND car:%s\",\"analyze_wildcard\":true}},\"filter\":[]}" % (
track, challenge, car)
"searchSourceJSON": "{\"index\":\"rally-results-*\",\"query\":{\"query_string\":{\"query\":\"environment:release AND active:true AND track:%s AND challenge:%s AND car:%s AND node-count:%d\",\"analyze_wildcard\":true}},\"filter\":[]}" % (
track, challenge, car, node_count)
}
}
}
Expand All @@ -193,7 +195,7 @@ def generate_io(tracks):

def generate_gc(tracks):
structures = []
for track, challenge, car, queries in default_tracks(tracks):
for track, challenge, car, node_count, queries in default_tracks(tracks):
title = "release-%s-gc" % track
s = {
"_id": str(uuid.uuid4()),
Expand Down Expand Up @@ -225,8 +227,8 @@ def generate_gc(tracks):
"description": "",
"version": 1,
"kibanaSavedObjectMeta": {
"searchSourceJSON": "{\"index\":\"rally-results-*\",\"query\":{\"query_string\":{\"query\":\"environment:release AND active:true AND track:%s AND challenge:%s AND car:%s\",\"analyze_wildcard\":true}},\"filter\":[]}" % (
track, challenge, car)
"searchSourceJSON": "{\"index\":\"rally-results-*\",\"query\":{\"query_string\":{\"query\":\"environment:release AND active:true AND track:%s AND challenge:%s AND car:%s AND node-count:%d\",\"analyze_wildcard\":true}},\"filter\":[]}" % (
track, challenge, car, node_count)
}
}
}
Expand Down
Loading

0 comments on commit 9ddc749

Please sign in to comment.