Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: bench: introduce initial benchmarking infrastructure
To better understand the current performance characteristics and to guide future development, introduce microbenchmarks for various steps in the `cwe_checker`'s analysis. This commit adds benchmarks for the following steps: - CFG construction, - individual normalization passes, - function signatures analysis, - pointer inference, - string abstractions, - individual checkers. All benchmarks are executed on the following input programs: - ls, - netfs.ko, for the following architectures: - amd64, - arm64, - armel, - armhf, - mips64el, - mipsel, - ppc64el, - x86. Inputs are stored in the `benches/_data/` directory. It contains json-serialized pcode projects and binaries. The pcode projects are included for the following reasons: - not requiring a Ghidra installation on the benchmarking system, - avoid that changes in Ghidra version influence the benchmark results, - reduce the time it takes to run the benchmarks. The inputs are not included in the repository and have to be obtained from an external source. Since the binaries are taken from Debian packages it shouldn't be a problem to re-distribute them if we include the copyright information. This implementation is based on the Criterion.rs crate. It is added to the dev-dependencies of the `cwe_checker_lib` and the `Cargo.lock` is updated accordingly. Signed-off-by: Valentin Obst <[email protected]>
- Loading branch information