Repository navigation
fix(examples): stop legacy_smoke test_perf raising KeyError for engines it skips (#2305) - #2375
Conversation
|
Review: GOOD TO GO at |
…es it skips (#2305) test_perf.py walked _engine_support.ENGINES but looked each benchmark up in a table covering only default, pyshark, scapy and dpkt, so the first other engine to pass preflight (pypcap, pcap_ct, pypcapfile) raised KeyError and ended the run. One bench() takes the engine name, so every engine in ENGINES is benchmarked into ../captures/engines/<engine>.txt or skipped with its reason. The README's engine list for test_perf follows. tests/project/test_legacy_smoke_perf_2305.py runs the demo with pyperf and the engine checks stubbed.
9d58d48 to
3e38ac4
Compare
|
Rebased and amended All review findings now addressed. |
|
Coverage: 91.58% (unit tier, Python 3.15,
Per-file detail: the |
|
Ready to merge. Review: GOOD TO GO (Sonnet) at |
make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
fix — bug fixDescription
Closes #2305.
examples/legacy_smoke/test_perf.pywalked_engine_support.ENGINESbut looked each benchmark up in a table covering onlydefault,pyshark,scapyanddpkt, so the first other engine to pass preflight (pypcap,pcap_ct,pypcapfile) raisedKeyErrorand ended the run.bench()now takes the engine name, so every engine inENGINESis benchmarked into../captures/engines/<engine>.txtor skipped with its reason. The README's engine list fortest_perffollows.tests/project/test_legacy_smoke_perf_2305.pyruns the demo withpyperfand the engine checks stubbed.