Skip to content

Commit

Permalink
Only call io_counters if present
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-janidlo authored and LeiGlobus committed Jan 24, 2025
1 parent 9fa8f8c commit 42ceb8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compute_endpoint/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def resource_watcher():
fds_beg = p.num_fds()
thread_beg = p.num_threads()
ctx_beg = p.num_ctx_switches()
io_beg = p.io_counters()
io_beg = getattr(p, "io_counters", lambda: "(not supported on this system)")()
ls_fds = subprocess.run(ls_args, capture_output=True)
os_fds_view_beg = ls_fds.stdout.decode()

Expand All @@ -261,7 +261,7 @@ def resource_watcher():
fds_end = p.num_fds()
thread_end = p.num_threads()
ctx_end = p.num_ctx_switches()
io_end = p.io_counters()
io_end = getattr(p, "io_counters", lambda: "(not supported on this system)")()
ls_fds = subprocess.run(ls_args, capture_output=True)
os_fds_view_end = ls_fds.stdout.decode()

Expand Down

0 comments on commit 42ceb8b

Please sign in to comment.