-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1931812 - Don't reingest the DB on each query benchmark
This addresses the bug and also makes one other change: I added a new method to `BenchmarkWithInput` called `global_input()` that returns some data that's then passed by reference to the benchmark's iterations. That's a little better than creating global data in benchmark constructors because it means only the global data for the current benchmark is in memory instead of the global data for all benchmarks in the group. In the case of query benchmarks, the global data is the store, so we avoid having N stores in memory at once, N = the number of benchmarks in the group. (I'm adding quite a few weather benchmarks.) It also made sense to rename `generate_input()` to `iteration_input()` to emphasize that that method is called on each iteration. I'm open to reverting this other change though if you disagree. The speedup between this and the main branch when running `time cargo suggest-bench -- query/query` isn't dramatic but it's a little better: ``` main branch: ~83s this branch: ~68s (~18% improvement) ```
- Loading branch information
Showing
5 changed files
with
87 additions
and
38 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
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
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
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
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