-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: only install canister once when running benchmarks (#60)
Prior to this commit, PocketIC reinstalled the canister for every single benchmark it runs. This was due to a limitation in `drun` (the runtime used prior to PocketIC) and isn't unnecessary given that benchmarks are all queries. With this change, the canister is installed only once at the beginning, resulting in a significant speed up when having lots of benchmarks. Testing this change on the `stable-structures` crate: Before this change: ``` canbench 18.17s user 2.81s system 12% cpu 2:46.37 total ``` With this change: ``` canbench 0.54s user 0.13s system 1% cpu 1:01.41 total ``` Benchmarks run almost 3x faster in this example.
- Loading branch information
Showing
1 changed file
with
34 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters