Phase 19: measure graph scaling and guard capacity and contention behavior
This commit is contained in:
parent
1369e4d463
commit
6b85f28add
9 changed files with 639 additions and 3 deletions
33
tools/stress.py
Normal file
33
tools/stress.py
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Run existing publication/GUI tests while two ordinary CPU workers contend."""
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
p = argparse.ArgumentParser(description=__doc__)
|
||||
p.add_argument('--build-dir', type=Path, required=True)
|
||||
p.add_argument('--gui', action='store_true')
|
||||
a = p.parse_args()
|
||||
workers = []
|
||||
try:
|
||||
for _ in range(2):
|
||||
workers.append(subprocess.Popen([sys.executable, '-c', 'x=1\nwhile True: x=(x*1664525+1013904223)&0xffffffff']))
|
||||
for name in ('test_realtime', 'test_reliability', 'test_scale'):
|
||||
subprocess.run([str((a.build_dir / name).resolve())], check=True, timeout=120)
|
||||
if a.gui:
|
||||
# The GUI suite pumps timers and forces redraw during engine/edit tests.
|
||||
subprocess.run(['xvfb-run', '-a', '-s', '-screen 0 1280x800x24',
|
||||
str((a.build_dir / 'test_gui').resolve())], check=True, timeout=120)
|
||||
finally:
|
||||
for w in workers:
|
||||
w.terminate()
|
||||
for w in workers:
|
||||
w.wait(timeout=10)
|
||||
print('Publication, capacity and optional GUI/timer tests passed under two CPU workers.')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue