Skip to content

Commit

Permalink
chore: fix committer_ci benchmarking phase (#51)
Browse files Browse the repository at this point in the history
Signed-off-by: Dori Medini <dori@starkware.co>
  • Loading branch information
dorimedini-starkware authored Jul 25, 2024
1 parent 4867234 commit 57a5f42
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/committer_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- uses: 'google-github-actions/setup-gcloud@v2'
- run: echo "BENCH_INPUT_FILES_PREFIX=$(cat ./crates/committer_cli/src/tests/flow_test_files_prefix)" >> $GITHUB_ENV
- run: gcloud storage cp -r gs://committer-testing-artifacts/$BENCH_INPUT_FILES_PREFIX/* ./crates/committer_cli/benches
- run: cargo test --release -- --include-ignored test_regression
- run: cargo test -p committer_cli --release -- --include-ignored test_regression

benchmarking:
runs-on: ubuntu-latest
Expand All @@ -59,10 +59,10 @@ jobs:

# List the existing benchmarks.
- run: |
cargo bench -- --list | grep ': benchmark$' | sed -e "s/: benchmark$//" > benchmarks_list.txt
cargo bench -p committer_cli -- --list | grep ': benchmark$' | sed -e "s/: benchmark$//" > benchmarks_list.txt
# Benchmark the old code.
- run: cargo bench
- run: cargo bench -p committer_cli

# Backup the downloaded files to avoid re-downloading them if they didn't change (overwritten by checkout).
- run: mv ./crates/committer_cli/benches/tree_flow_inputs.json ./crates/committer_cli/benches/tree_flow_inputs.json_bu
Expand Down Expand Up @@ -139,4 +139,4 @@ jobs:
uses: "google-github-actions/upload-cloud-storage@v2"
with:
path: "CLI_TARGET/release/committer_cli"
destination: "committer-products-external/${{ env.SHORT_HASH }}/release/"
destination: "committer-products-external/${{ env.SHORT_HASH }}/release/"
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ benchmark_results=${2}
# TODO: split the output file instead.
cat ${benchmarks_list} |
while read line; do
cargo bench $line > ${line}.txt;
cargo bench -p committer_cli $line > ${line}.txt;
sed -i '/'"${line}"'/,$!d' ${line}.txt;
done

Expand Down

0 comments on commit 57a5f42

Please sign in to comment.