This patch introduces index benchmarks on top of the proposed LLVM benchmark pull.
- Rebase on top of new code
- Simplify code structure and get rid of global state (except for two filenames coming from main())
The only problem now is that the generated output contains log strings (e.g. "Built DexIndex with estimated memory usage 63445392 bytes.", see example in the Summary), I should find a way to deal with that (since it's rather annoying). It's also the case for the dexplorer tool.
Nice and simple :-) Looks good, just some details.
|1 ↗||(On Diff #164414)|
rename? (it's not just dex now, right?)
|21 ↗||(On Diff #164414)|
const char* (no globals with nontrivial constructors/destructors)
|25 ↗||(On Diff #164414)|
these should be in ns clang::clangd::<anonymous> I think?
|26 ↗||(On Diff #164414)|
This includes reading the file contents, which I'm not sure is a useful part of the BuildDex() benchmark.
You could consider splitting into loadIndex that takes content and loadIndexFromFile that takes a filename. The former would be more appropriate to time.
|33 ↗||(On Diff #164414)|
|65 ↗||(On Diff #164414)|
this seems a little weird - the extractQueriesFromLogs/buildDex seem to be agnostic to the index contents, but here we assume knowledge of it being LLVM.
The former model is nicer, and we can extend it by using the JSON representation to add more query attributes. Can we drop this function, and ArtificialQueries->Queries?
|104 ↗||(On Diff #164414)|
remove dex if this isn't dex-specific?
|132 ↗||(On Diff #164414)|
BTW this also counts *destruction* time. I think that's fine, though.
Same as any other binary that isn't itself a test - make sure it works :-)
(Mostly just that it doesn't crash)
|1 ↗||(On Diff #164887)|
i'd call this index-tools.test - it's a good integration test for global-symbol-builder, better when we add dexp to the test to verify the output.