Skip to content

Commit

Permalink
tests: support wait_ms in admin class
Browse files Browse the repository at this point in the history
  • Loading branch information
ballard26 committed Nov 2, 2023
1 parent 4b7ea5a commit 7032a4c
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions tests/rptest/services/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1070,11 +1070,23 @@ def get_sampled_memory_profile(self, node=None, shard=None):
node=node,
**kwargs).json()

def get_cpu_profile(self, node=None):
def get_cpu_profile(self, node=None, wait_ms=None):
"""
Get the CPU profile of a node.
"""
return self._request("get", "debug/cpu_profile", node=node).json()
path = "debug/cpu_profile"
params = {}
timeout = DEFAULT_TIMEOUT

if wait_ms:
params["wait_ms"] = wait_ms
timeout = max(2 * (int(wait_ms) // 1_000), timeout)

return self._request("get",
path,
node=node,
timeout=timeout,
params=params).json()

def get_local_offsets_translated(self,
offsets,
Expand Down

0 comments on commit 7032a4c

Please sign in to comment.