Skip to content

Commit

Permalink
use the iowait stat by default
Browse files Browse the repository at this point in the history
  • Loading branch information
wumpus committed Jul 25, 2020
1 parent 7f1940f commit 06e2a84
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions Makefile
@@ -1,6 +1,7 @@
.PHONY: test clean_coverage test_coverage distclean dist_check dist

test:
# hint: PYTEST_STDERR_VISIBLE=-v
PYTHONPATH=. pytest test/unit
PYTHONPATH=. test/integration/test-multiprocessing.sh test/integration
PYTHONPATH=.:test/integration test/integration/test-ray.sh test/integration
Expand Down
7 changes: 4 additions & 3 deletions paramsurvey/psmultiprocessing.py
Expand Up @@ -35,7 +35,7 @@ def finalize():


def current_core_count():
# XXX should be the pool size
# XXX should be the pool size, if confered by init(ncores=)
# XXX also affected by os.sched_getaffinity
return multiprocessing.cpu_count()

Expand Down Expand Up @@ -73,8 +73,9 @@ def do_work_wrapper(func, system_kwargs, user_kwargs, psets):
user_ret = {'pset': pset}

try:
with stats.record_wallclock(name, raw_stats):
result = func(pset, system_kwargs, user_kwargs, raw_stats)
with stats.record_wallclock(name+'_wall', raw_stats):
with stats.record_iowait(name+'_io', raw_stats):
result = func(pset, system_kwargs, user_kwargs, raw_stats)
user_ret['result'] = result
except Exception as e:
user_ret['exception'] = repr(e)
Expand Down
5 changes: 3 additions & 2 deletions paramsurvey/psray.py
Expand Up @@ -75,8 +75,9 @@ def do_work_wrapper(func, system_kwargs, user_kwargs, psets):
user_ret = {'pset': pset}

try:
with stats.record_wallclock(name, raw_stats):
result = func(pset, system_kwargs, user_kwargs, raw_stats)
with stats.record_wallclock(name+'_wall', raw_stats):
with stats.record_iowait(name+'_io', raw_stats):
result = func(pset, system_kwargs, user_kwargs, raw_stats)
user_ret['result'] = result
except Exception as e:
user_ret['exception'] = repr(e)
Expand Down

0 comments on commit 06e2a84

Please sign in to comment.