diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 28080281b..dedebf447 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -4,6 +4,8 @@ on: schedule: - cron: '0 4 * * *' workflow_dispatch: + branches: + - "**" #TODO REMOVE PR EXECUTION push: branches: [develop, main] @@ -15,7 +17,7 @@ jobs: benchmark_proving: name: Benchmark proving for representative blocks runs-on: zero-reg - timeout-minutes: 200 # TBD + timeout-minutes: 200 # Timeout TBD steps: - name: Checkout code uses: actions/checkout@v3 @@ -27,7 +29,25 @@ jobs: RUSTFLAGS='-C target-cpu=native -Zlinker-features=-lld' cargo build --release sudo su -c "echo 0 > /proc/sys/kernel/perf_event_paranoid" + - name: Download previous results + uses: actions/download-artifact@v4 + with: + name: proving_benchmark_results.txt + path: ./ + - name: Run the script # TODO - run the benchmark with 20 blocks file run: | - ./scripts/benchmark_input.sh artifacts/witness_b19807080.json \ No newline at end of file + ./scripts/benchmark_input.sh artifacts/witness_b19807080.json | $MEASURED_PROVING_TIME_SEC + MEASURED_PROVING_TIME_SEC=`cat benchmark_output.log | grep 'Proving duration:' | tail -1 | awk '{ print int($3)}'` + MEASURED_PROVING_CPU_CLOCK_COUNT=`cat output.log | grep 'cycles' | tail -1 | awk '{ print int($1)}'` + printf '%s sec: %10s cpu: %30s\n' `date --utc +%y-%m-%d-%H:%M:%S` $MEASURED_PROVING_TIME_SEC $MEASURED_PROVING_CPU_CLOCK_COUNT >> proving_benchmark_results.txt + + - name: Upload results + uses: actions/upload-artifact@v4 + with: + name: proving_benchmark_results.txt + path: ./ + retention-days: 90 + overwrite: true +