Skip to content

Commit

Permalink
fix formatting errors
Browse files Browse the repository at this point in the history
Signed-off-by: Rishabh Singh <sngri@amazon.com>
  • Loading branch information
rishabh6788 committed Jan 15, 2025
1 parent 0579fb8 commit 372439f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ indent-after-paren=4
indent-string=' '

# Maximum number of characters on a single line.
max-line-length=140
max-line-length=180

# Maximum number of lines in a module.
max-module-lines=1000
Expand Down
6 changes: 3 additions & 3 deletions osbenchmark/worker_coordinator/worker_coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1877,14 +1877,14 @@ def allocations(self):
clients_executing_completing_task = []
for sub_task in task:
for client_index in range(start_client_index, start_client_index + sub_task.clients):
# this is the actual client that will execute the task. It may differ from the logical one in case we over-commit (i.e.
# more tasks than actually available clients)
physical_client_index = client_index % max_clients
if sub_task.completes_parent:
clients_executing_completing_task.append(physical_client_index)
ta = TaskAllocation(task = sub_task,
client_index_in_task = client_index - start_client_index,
global_client_index=client_index,
# if task represents a parallel structure this is the total number of clients
# executing sub-tasks concurrently.
total_clients=task.clients)
allocations[physical_client_index].append(ta)
start_client_index += sub_task.clients
Expand Down Expand Up @@ -2182,4 +2182,4 @@ def next(self):
self._it += 1

def __str__(self):
return "iteration-count-based"
return "iteration-count-based"
6 changes: 3 additions & 3 deletions osbenchmark/workload/workload.py
Original file line number Diff line number Diff line change
Expand Up @@ -996,11 +996,11 @@ def __hash__(self):
def __eq__(self, other):
# Note that we do not include `params` in __hash__ and __eq__ (the other attributes suffice to uniquely define a task)
return isinstance(other, type(self)) and (self.name, self.operation, self.warmup_iterations, self.iterations,
self.warmup_time_period, self.time_period, self.ramp_up_time_period,
self.clients, self.schedule,self.completes_parent) == (other.name,
self.warmup_time_period, self.time_period, self.ramp_up_time_period,
self.clients, self.schedule,self.completes_parent) == (other.name,
other.operation, other.warmup_iterations,
other.iterations, other.warmup_time_period, other.time_period,
self.ramp_up_time_period, other.clients, other.schedule,
self.ramp_up_time_period, other.clients, other.schedule,
other.completes_parent)

def __iter__(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/worker_coordinator/runner_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7325,4 +7325,4 @@ async def test_concurrent_segment_search_settings(self, opensearch, on_client_re
"search.concurrent_segment_search.enabled": "true",
"search.concurrent.max_slice_count": 2
}
})
})

0 comments on commit 372439f

Please sign in to comment.