Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assign worker-id globally #983

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion esrally/driver/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,9 +470,10 @@ def start_benchmark(self):
self.logger.info("Allocation matrix:\n%s", "\n".join([str(a) for a in self.allocations]))

worker_assignments = calculate_worker_assignments(self.load_driver_hosts, allocator.clients)
worker_id = 0
for assignment in worker_assignments:
host = assignment["host"]
for worker_id, clients in enumerate(assignment["workers"]):
for clients in assignment["workers"]:
# don't assign workers without any clients
if len(clients) > 0:
self.logger.info("Allocating worker [%d] on [%s] with [%d] clients.", worker_id, host, len(clients))
Expand All @@ -484,6 +485,7 @@ def start_benchmark(self):
self.clients_per_worker[client_id] = worker_id
self.target.start_worker(worker, worker_id, self.config, self.track, client_allocations)
self.workers.append(worker)
worker_id += 1

self.update_progress_message()

Expand Down