You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The previous run's speedup worked (step #6 went 3 min -> 1 min,
step #8 7 min -> 5 min, total ~7 min wall time), but step #9
Create Performance Report aborted because pytest captures stdout
by default. The test code's per-query timing prints
(`NeuronsPartHere: 1.28s ✅` etc) never made it into
performance_test_output.log, and the report parser's
`grep -E ^(...) | while read` pipe returned grep-exit-1 on the
empty match. With pipefail+set-e that's a step failure.
Two-pronged fix:
1. `pytest -v -n auto` -> `pytest -v -s -n auto` in step #6, and
`pytest -v -n 8` -> `pytest -v -s -n 8` in step #8. `-s`
disables stdout capture so the timing prints land in the log
like they did under `python -m unittest`.
2. Wrap the timing-extraction grep in `{ grep || true; } | while`
so pipefail can't fail the report step on a future format
change.
grep -E "^(get_term_info|NeuronsPartHere|NeuronsSynaptic|NeuronsPresynapticHere|NeuronsPostsynapticHere|ComponentsOf|PartsOf|SubclassesOf|NeuronClassesFasciculatingHere|TractsNervesInnervatingHere|LineageClonesIn|ListAllAvailableImages|NeuronNeuronConnectivityQuery|NeuronRegionConnectivityQuery|NeuronInputsTo|DownstreamClassConnectivity|UpstreamClassConnectivity|QueryConnectivity):" performance_test_output.log | while read line; do
301
-
QUERY=$(echo "$line" | sed 's/:.*//')
299
+
# Parse timing information. The `|| true` guards against pipefail
300
+
# propagating grep's exit-1 (no matches) into the step — which
301
+
# was happening when pytest captured stdout and the per-query
302
+
# timing lines never landed in the log.
303
+
{ grep -E "^(get_term_info|NeuronsPartHere|NeuronsSynaptic|NeuronsPresynapticHere|NeuronsPostsynapticHere|ComponentsOf|PartsOf|SubclassesOf|NeuronClassesFasciculatingHere|TractsNervesInnervatingHere|LineageClonesIn|ListAllAvailableImages|NeuronNeuronConnectivityQuery|NeuronRegionConnectivityQuery|NeuronInputsTo|DownstreamClassConnectivity|UpstreamClassConnectivity|QueryConnectivity):" performance_test_output.log || true; } | while read line; do
304
+
QUERY=$(echo "$line" | sed 's/:.*//')
302
305
DURATION=$(echo "$line" | sed 's/.*: \([0-9.]*\)s.*/\1/')
0 commit comments