Skip to content

Commit

Permalink
fix: uplaad results to artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
atanmarko committed Oct 4, 2024
1 parent 877f8ce commit 1d056df
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
schedule:
- cron: '0 4 * * *'
workflow_dispatch:
branches:
- "**"
#TODO REMOVE PR EXECUTION
push:
branches: [develop, main]
Expand All @@ -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
Expand All @@ -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
./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

0 comments on commit 1d056df

Please sign in to comment.