@@ -308,59 +308,59 @@ jobs:
308308 if : success()
309309 run : python cicd/python/build.py --verbose --test
310310
311- # - name: Benchmark
312- # if: success()
313- # run: |
314- # outFile="cicd/log/current-bench-nocache.txt"
315- # baselineRefFile="cicd/ref/bench/baseline-go-bench.log"
316- # thresholdRefFile="cicd/ref/bench/max-threshold-go-bench.log"
317- # go test -run='^$' -bench . -benchtime=100x -count=6 \
318- # --tags "sqlite_stackql" --ldflags "-X stackql/internal/stackql/planbuilder.PlanCacheEnabled=false" \
319- # ./... | tee ${outFile}
320- # # shellcheck disable=SC2181
321- # if [ "$?" = "0" ]; then
322- # echo "Benchmarking run completed successfully"
323- # else
324- # echo "Benchmarking run failed"
325- # exit 1
326- # fi
327- # echo ""
328- # echo "##### Raw benchstat on current run #####"
329- # echo ""
330- # benchstat ${outFile} | tee cicd/log/raw-benchstat.txt
331- # echo ""
332- # echo "##### Comparing to baseline #####"
333- # echo ""
334- # benchstat -row .name -table .config -ignore goos,goarch,cpu ${baselineRefFile} ${outFile} | tee cicd/log/comparison-benchstat.txt
335- # echo ""
336- # echo "##### Comparing to max threshold #####"
337- # echo ""
338- # benchstat -row .name -table .config -ignore goos,goarch,cpu ${thresholdRefFile} ${outFile} | tee cicd/log/threshold-comparison-benchstat.txt
339- # # shellcheck disable=SC2002,SC2062
340- # comparisons=$( cat cicd/log/threshold-comparison-benchstat.txt \
341- # | sed 's/.*\([+-][0-9][0-9]\.[0-9][0-9]*[%]\).*/\1/' \
342- # | grep [+-][0-9][0-9]*\.[0-9][0-9]*[%] \
343- # )
344- # echo ""
345- # echo "##### Comparisons #####"
346- # echo ""
347- # echo "${comparisons}"
348- # # shellcheck disable=SC2062
349- # nonNegativeComparisons=$( echo "${comparisons}" \
350- # | grep -v [-].* \
351- # || true
352- # )
353- # echo "completed comparison logic"
354- # if [ -z "${nonNegativeComparisons}" ]; then
355- # echo "All max threshold comparisons are negative: this is acceptable"
356- # else
357- # echo "Some max threshold comparisons are positive or zero: this is unacceptable"
358- # echo ""
359- # echo "##### Non-negative comparisons #####"
360- # echo "${nonNegativeComparisons}"
361- # echo ""
362- # exit 1
363- # fi
311+ - name : Benchmark
312+ if : success()
313+ run : |
314+ outFile="cicd/log/current-bench-nocache.txt"
315+ baselineRefFile="cicd/ref/bench/baseline-go-bench.log"
316+ thresholdRefFile="cicd/ref/bench/max-threshold-go-bench.log"
317+ go test -run='^$' -bench . -benchtime=100x -count=6 \
318+ --tags "sqlite_stackql" --ldflags "-X stackql/internal/stackql/planbuilder.PlanCacheEnabled=false" \
319+ ./... | tee ${outFile}
320+ # shellcheck disable=SC2181
321+ if [ "$?" = "0" ]; then
322+ echo "Benchmarking run completed successfully"
323+ else
324+ echo "Benchmarking run failed"
325+ exit 1
326+ fi
327+ echo ""
328+ echo "##### Raw benchstat on current run #####"
329+ echo ""
330+ benchstat ${outFile} | tee cicd/log/raw-benchstat.txt
331+ echo ""
332+ echo "##### Comparing to baseline #####"
333+ echo ""
334+ benchstat -row .name -table .config -ignore goos,goarch,cpu ${baselineRefFile} ${outFile} | tee cicd/log/comparison-benchstat.txt
335+ echo ""
336+ echo "##### Comparing to max threshold #####"
337+ echo ""
338+ benchstat -row .name -table .config -ignore goos,goarch,cpu ${thresholdRefFile} ${outFile} | tee cicd/log/threshold-comparison-benchstat.txt
339+ # shellcheck disable=SC2002,SC2062
340+ comparisons=$( cat cicd/log/threshold-comparison-benchstat.txt \
341+ | sed 's/.*\([+-][0-9][0-9]\.[0-9][0-9]*[%]\).*/\1/' \
342+ | grep [+-][0-9][0-9]*\.[0-9][0-9]*[%] \
343+ )
344+ echo ""
345+ echo "##### Comparisons #####"
346+ echo ""
347+ echo "${comparisons}"
348+ # shellcheck disable=SC2062
349+ nonNegativeComparisons=$( echo "${comparisons}" \
350+ | grep -v [-].* \
351+ || true
352+ )
353+ echo "completed comparison logic"
354+ if [ -z "${nonNegativeComparisons}" ]; then
355+ echo "All max threshold comparisons are negative: this is acceptable"
356+ else
357+ echo "Some max threshold comparisons are positive or zero: this is unacceptable"
358+ echo ""
359+ echo "##### Non-negative comparisons #####"
360+ echo "${nonNegativeComparisons}"
361+ echo ""
362+ exit 1
363+ fi
364364
365365 - name : Upload Artifact
366366@@ -705,59 +705,59 @@ jobs:
705705 if : success()
706706 run : python cicd/python/build.py --verbose --test
707707
708- # - name: Benchmark
709- # if: success()
710- # run: |
711- # outFile="cicd/log/current-bench-nocache.txt"
712- # baselineRefFile="cicd/ref/bench/baseline-go-bench.log"
713- # thresholdRefFile="cicd/ref/bench/max-threshold-go-bench.log"
714- # go test -run='^$' -bench . -benchtime=100x -count=6 \
715- # --tags "sqlite_stackql" --ldflags "-X stackql/internal/stackql/planbuilder.PlanCacheEnabled=false" \
716- # ./... | tee ${outFile}
717- # # shellcheck disable=SC2181
718- # if [ "$?" = "0" ]; then
719- # echo "Benchmarking run completed successfully"
720- # else
721- # echo "Benchmarking run failed"
722- # exit 1
723- # fi
724- # echo ""
725- # echo "##### Raw benchstat on current run #####"
726- # echo ""
727- # benchstat ${outFile} | tee cicd/log/raw-benchstat.txt
728- # echo ""
729- # echo "##### Comparing to baseline #####"
730- # echo ""
731- # benchstat -row .name -table .config -ignore goos,goarch,cpu ${baselineRefFile} ${outFile} | tee cicd/log/comparison-benchstat.txt
732- # echo ""
733- # echo "##### Comparing to max threshold #####"
734- # echo ""
735- # benchstat -row .name -table .config -ignore goos,goarch,cpu ${thresholdRefFile} ${outFile} | tee cicd/log/threshold-comparison-benchstat.txt
736- # # shellcheck disable=SC2002,SC2062
737- # comparisons=$( cat cicd/log/threshold-comparison-benchstat.txt \
738- # | sed 's/.*\([+-][0-9][0-9]\.[0-9][0-9]*[%]\).*/\1/' \
739- # | grep [+-][0-9][0-9]*\.[0-9][0-9]*[%] \
740- # )
741- # echo ""
742- # echo "##### Comparisons #####"
743- # echo ""
744- # echo "${comparisons}"
745- # # shellcheck disable=SC2062
746- # nonNegativeComparisons=$( echo "${comparisons}" \
747- # | grep -v [-].* \
748- # || true
749- # )
750- # echo "completed comparison logic"
751- # if [ -z "${nonNegativeComparisons}" ]; then
752- # echo "All max threshold comparisons are negative: this is acceptable"
753- # else
754- # echo "Some max threshold comparisons are positive or zero: this is unacceptable"
755- # echo ""
756- # echo "##### Non-negative comparisons #####"
757- # echo "${nonNegativeComparisons}"
758- # echo ""
759- # exit 1
760- # fi
708+ - name : Benchmark
709+ if : success()
710+ run : |
711+ outFile="cicd/log/current-bench-nocache.txt"
712+ baselineRefFile="cicd/ref/bench/baseline-go-bench.log"
713+ thresholdRefFile="cicd/ref/bench/max-threshold-go-bench.log"
714+ go test -run='^$' -bench . -benchtime=100x -count=6 \
715+ --tags "sqlite_stackql" --ldflags "-X stackql/internal/stackql/planbuilder.PlanCacheEnabled=false" \
716+ ./... | tee ${outFile}
717+ # shellcheck disable=SC2181
718+ if [ "$?" = "0" ]; then
719+ echo "Benchmarking run completed successfully"
720+ else
721+ echo "Benchmarking run failed"
722+ exit 1
723+ fi
724+ echo ""
725+ echo "##### Raw benchstat on current run #####"
726+ echo ""
727+ benchstat ${outFile} | tee cicd/log/raw-benchstat.txt
728+ echo ""
729+ echo "##### Comparing to baseline #####"
730+ echo ""
731+ benchstat -row .name -table .config -ignore goos,goarch,cpu ${baselineRefFile} ${outFile} | tee cicd/log/comparison-benchstat.txt
732+ echo ""
733+ echo "##### Comparing to max threshold #####"
734+ echo ""
735+ benchstat -row .name -table .config -ignore goos,goarch,cpu ${thresholdRefFile} ${outFile} | tee cicd/log/threshold-comparison-benchstat.txt
736+ # shellcheck disable=SC2002,SC2062
737+ comparisons=$( cat cicd/log/threshold-comparison-benchstat.txt \
738+ | sed 's/.*\([+-][0-9][0-9]\.[0-9][0-9]*[%]\).*/\1/' \
739+ | grep [+-][0-9][0-9]*\.[0-9][0-9]*[%] \
740+ )
741+ echo ""
742+ echo "##### Comparisons #####"
743+ echo ""
744+ echo "${comparisons}"
745+ # shellcheck disable=SC2062
746+ nonNegativeComparisons=$( echo "${comparisons}" \
747+ | grep -v [-].* \
748+ || true
749+ )
750+ echo "completed comparison logic"
751+ if [ -z "${nonNegativeComparisons}" ]; then
752+ echo "All max threshold comparisons are negative: this is acceptable"
753+ else
754+ echo "Some max threshold comparisons are positive or zero: this is unacceptable"
755+ echo ""
756+ echo "##### Non-negative comparisons #####"
757+ echo "${nonNegativeComparisons}"
758+ echo ""
759+ exit 1
760+ fi
761761
762762 - name : Create certificates for robot tests
763763 run : |
0 commit comments