Skip to content

Commit

Permalink
feat: add benchmarks for the IndexedCrate::new method (#403) (#408)
Browse files Browse the repository at this point in the history
Currently uses `criterion` for benchmarks, but another option would be
`iai-callgrind` which provides "oneshot" benchmarks (which are way
faster and more reliable in busy systems like CI), but AFAIK
`iai-callgrind` only supports Linux.

Also adds a script to download aws-sdk-ec2 and build the rustdoc JSON.
It should work on MacOS, but I don't have a way to test that. It also
relies on `rustup` (because we use `cargo +nightly`).

Current numbers on my system:

```
IndexedCrate/new(aws-sdk-ec2)
                        time:   [1.5561 s 1.5609 s 1.5656 s]
```

Co-authored-by: Jalil David Salamé Messina <60845989+jalil-salame@users.noreply.github.com>
  • Loading branch information
obi1kenobi and jalil-salame authored Aug 28, 2024
1 parent c15b0a7 commit 0d07343
Show file tree
Hide file tree
Showing 5 changed files with 475 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ test_crates/**/Cargo.lock

# ide
.idea

# Benchmarks and profiling related data
flamegraph.svg
perf.data
perf.data.old
Loading

0 comments on commit 0d07343

Please # to comment.