@@ -19,6 +19,11 @@ inputs:
1919 description : The number of iterations with which to run each benchmark.
2020 required : false
2121 default : 12
22+ repo-for-saving-data :
23+ description : |
24+ The directory name of the repository where graphs and CSVs from benchmarks should be saved.
25+ type : string
26+ default : benchmarks-lingua-franca
2227
2328
2429outputs :
@@ -48,16 +53,18 @@ runs:
4853 run : |
4954 SHA=$(cd lf/${{ steps.check-out.outputs.submodule-dir }} && \
5055 git rev-parse --short=7 HEAD && cd ../../../../../..)
51- BRANCH=${{ inputs.runtime-ref }}
5256 OUTPUT_DIR=csvs/$(date -I)
53- mkdir -p reactor-c/$OUTPUT_DIR
54- OUTPUT_FILE=$OUTPUT_DIR/${{ inputs.scheduler }}-${{ inputs.num-workers }}-$BRANCH-${SHA:0:7}.csv
55- echo "::set-output name=output-file::$OUTPUT_FILE"
56- if [ -f reactor-c/$OUTPUT_FILE ]; then
57+ mkdir -p ${{ inputs.repo-for-saving-data }}/csvs
58+ OUTPUT_FILENAME=${{ inputs.scheduler }}-${{ inputs.num-workers }}-${{ inputs.runtime-ref }}-${SHA:0:7}.csv
59+ EXISTING_FILE=$(find ${{ inputs.repo-for-saving-data }}/csvs -name $OUTPUT_FILENAME | head -n 1)
60+ if [[ -z $EXISTING_FILE ]]; then
61+ mkdir -p ${{ inputs.repo-for-saving-data }}/$OUTPUT_DIR
62+ echo "The collected benchmark results will be saved to $OUTPUT_FILE."
63+ echo "::set-output name=output-file::$OUTPUT_DIR/$OUTPUT_FILENAME"
64+ else
5765 echo "The benchmark will not be run because results for that commit are already saved at $OUTPUT_FILE."
5866 echo "::set-output name=file-already-exists::true"
59- else
60- echo "The collected benchmark results will be saved to $OUTPUT_FILE."
67+ echo "::set-output name=output-file::$EXISTING_FILE"
6168 fi
6269 shell : bash
6370
8895 - name : Collect benchmark results
8996 id : collect-results
9097 run : |
91- ./runner/collect_results.py latest reactor-c /${{ steps.compute-output-file.outputs.output-file }}
98+ ./runner/collect_results.py latest ${{ inputs.repo-for-saving-data }} /${{ steps.compute-output-file.outputs.output-file }}
9299 shell : bash
93100 if : ${{ ! steps.compute-output-file.outputs.file-already-exists }}
0 commit comments