-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce initial benchmarking infrastructure #464
Merged
vobst
merged 5 commits into
fkie-cad:master
from
vobst:initial_benchmarking_infrastructure
May 15, 2024
Merged
Introduce initial benchmarking infrastructure #464
vobst
merged 5 commits into
fkie-cad:master
from
vobst:initial_benchmarking_infrastructure
May 15, 2024
Conversation
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
vobst
changed the title
Introduce initial benchmarking infrastructure
WIP: Introduce initial benchmarking infrastructure
May 7, 2024
vobst
force-pushed
the
initial_benchmarking_infrastructure
branch
2 times, most recently
from
May 8, 2024 13:05
6cc0a14
to
f56691c
Compare
vobst
changed the title
WIP: Introduce initial benchmarking infrastructure
Introduce initial benchmarking infrastructure
May 8, 2024
vobst
force-pushed
the
initial_benchmarking_infrastructure
branch
from
May 8, 2024 20:47
f56691c
to
c3762d7
Compare
vobst
commented
May 14, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a bunch of nits.
On stable Rust, Criterion.rs can only use and benchmark public functions. Thus, expose some functions that will be used in the benchmarks. Signed-off-by: Valentin Obst <[email protected]>
vobst
pushed a commit
to vobst/cwe_checker
that referenced
this pull request
May 15, 2024
Link: fkie-cad#464 Signed-off-by: Valentin Obst <[email protected]>
vobst
force-pushed
the
initial_benchmarking_infrastructure
branch
from
May 15, 2024 06:33
6258bc6
to
cca43fc
Compare
vobst
commented
May 15, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few nits.
On stable Rust, Criterion.rs can only use and benchmark public functions. Thus, expose some functions that will be used in the benchmarks. Signed-off-by: Valentin Obst <[email protected]>
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]>
Signed-off-by: Valentin Obst <[email protected]>
Link: fkie-cad#464 Signed-off-by: Valentin Obst <[email protected]>
vobst
force-pushed
the
initial_benchmarking_infrastructure
branch
from
May 15, 2024 07:11
cca43fc
to
c97272c
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To better understand the current performance characteristics and to
guide future development, introduce microbenchmarks for various steps in
the
cwe_checker
's analysis.This PR adds benchmarks for the following steps:
All benchmarks are executed on the following input programs:
for the following architectures:
Inputs are stored in the
benches/_data/
directory. It containsjson-serialized pcode projects and binaries. The pcode projects are
included for the following reasons:
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 theCargo.lock
isupdated accordingly.
Benchmark Results
Full results for the current master are available here for future reference.
Even though both full runs were performed on the same, dedicated system with minimized background activity, there are some considerable differences in some benchmarks. I need to investigate this further to get a reproducible setup.