Skip to content

Commit

Permalink
chore: update bench script
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Alin committed Dec 3, 2024
1 parent 2d3ddba commit bf6d34c
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 5 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/bench.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,10 @@ jobs:

- name: Run Benchmarks and Save Output
run: |
mkdir -p benchmarks_output
cargo bench --workspace --all-features | grep -A 100 'benchmarks' > benchmarks_output/cargo_bench_output.txt
sh update-bench.sh
- name: Upload Benchmarks Output
uses: actions/upload-artifact@v4
with:
name: benchmarks_output
path: benchmarks_output/cargo_bench_output.txt
path: benchmarks/output.txt
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ divan = { version = "0.1.16" }

[[bench]]
name = "benchmarks"
path = "benches/benchmarks.rs"
harness = false
path = "benchmarks/benchmarks.rs"
harness = false
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Advent of Code 2020

This repository contains my solutions for the [Advent of Code 2020](https://adventofcode.com/2024) challenge.
File renamed without changes.
6 changes: 6 additions & 0 deletions benchmarks/output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
benchmarks fastest │ slowest │ median │ mean │ samples │ iters
├─ day_01_part_one 70.2 µs │ 114.5 µs │ 70.37 µs │ 71.58 µs │ 100 │ 100
├─ day_01_part_two 86.95 µs │ 146.2 µs │ 94.6 µs │ 95.73 µs │ 100 │ 100
├─ day_02_part_one 125.6 µs │ 212 µs │ 131.9 µs │ 133.2 µs │ 100 │ 100
╰─ day_02_part_two 164.3 µs │ 222.2 µs │ 168.7 µs │ 171.6 µs │ 100 │ 100

3 changes: 3 additions & 0 deletions update-bench.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
mkdir -p benchmarks
cargo bench | grep -A 100 'benchmarks' > benchmarks/output.txt

0 comments on commit bf6d34c

Please sign in to comment.