Skip to content

Commit

Permalink
Check for Memory Report: before reporting step
Browse files Browse the repository at this point in the history
  • Loading branch information
gartung committed Sep 7, 2024
1 parent 3958b22 commit 01b1403
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 6 additions & 1 deletion pr_testing/run-pr-comparisons
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,12 @@ for WF in ${WORKFLOWS_TO_COMPARE//,/ }; do
$CMS_BOT_DIR/comparisons/compare-maxmem.py $WORKSPACE/data/PR-${PR_NUM}/$WF_DIR/maxmem_profile_${WF_NUMBER}.txt $WORKSPACE/data/$COMPARISON_RELEASE/$WF_DIR/maxmem_profile_${WF_NUMBER}.txt > $OUTPUT_DIR/${WF_NUMBER}.txt 2> $OUTPUT_DIR/${WF_NUMBER}.err || true
fi
done
grep -q "exceeds threshold" $OUTPUT_DIR/*.err 2>/dev/null || echo "MAXMEM_COMPARISON${TEST_FLAVOR_STR};OK,max memory used ${UC_TEST_FLAVOR} comparison,See results,/SDT/jenkins-artifacts/${OUTPUT_DIR}/" >> ${RESULTS_FILE}
if grep "exceeds threshold" $OUTPUT_DIR/*.err 2>/dev/null then
echo "MAXMEM_COMPARISON${TEST_FLAVOR_STR};OK,max memory used ${UC_TEST_FLAVOR} comparison,See results,/SDT/jenkins-artifacts/${OUTPUT_DIR}/" >> ${RESULTS_FILE}
else
echo "MAXMEM_COMPARISON${TEST_FLAVOR_STR};OK,max memory used ${UC_TEST_FLAVOR} comparison,See results,/SDT/jenkins-artifacts/${OUTPUT_DIR}/" >> ${RESULTS_FILE}
fi

# ----------------------------------------------------------------------------
# Alternative Comparison
# ----------------------------------------------------------------------------
Expand Down
6 changes: 4 additions & 2 deletions run-ib-pr-matrix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@ pushd "$WORKSPACE/matrix-results"
memFile=maxmem_profile_$(echo $WF | cut -d_ -f1).txt
pushd $WF
for log in $(ls step*.log);do
echo ${log} | cut -d_ -f1 >> ${memFile}
grep "Memory Report: " $log | tail -5 >> ${memFile}
if grep -q "Memory Report: " $log 2>/dev/null; then
echo ${log} | cut -d_ -f1 >> ${memFile}
grep "Memory Report: " $log | tail -5 >> ${memFile}
fi
done
popd
done
Expand Down

0 comments on commit 01b1403

Please sign in to comment.