diff options
| author | 2026-10-15 17:03:03 +0330 | |
|---|---|---|
| committer | 2026-10-15 17:03:03 +0330 | |
| commit | 7cb983bbea98d2038b2a8015a6d1f1afd40991c9 (patch) | |
| tree | ec3d88a15801207fc6d8d3c6d142617ffec85460 /tests/bench/rss/measure.py | |
| parent | merge work/borrow: borrow returns before definition, borrows clause, borrow m... (diff) | |
| parent | bench: rss probe path fix (diff) | |
merge work/actors: wasm seed bootstrap (seed/MANIFEST), shared copy-on-write actor memory, top-level hold blocks on all backends and lsp
Diffstat (limited to 'tests/bench/rss/measure.py')
| -rw-r--r-- | tests/bench/rss/measure.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/bench/rss/measure.py b/tests/bench/rss/measure.py new file mode 100644 index 0000000..b4ad889 --- /dev/null +++ b/tests/bench/rss/measure.py @@ -0,0 +1,13 @@ +import sys,subprocess,resource,os +repo=sys.argv[1] +for b in ['zy','zyi','zym']: + row=[b] + for n in [0,10,100]: + pid=os.fork() + if pid==0: + fd=os.open(os.path.dirname(os.path.abspath(__file__))+f'/a{n}.zc',os.O_RDONLY); os.dup2(fd,0) + nul=os.open('/dev/null',os.O_WRONLY); os.dup2(nul,1) + os.chdir(repo); os.execv(f'{repo}/build/bin/{b}',[b]) + _,st,ru=os.wait4(pid,0) + row.append(f'{ru.ru_maxrss/1024:.1f}' + ('' if st==0 else f'(st{st})')) + print(' '.join(row)) |
