-
Notifications
You must be signed in to change notification settings - Fork 16
lind-perf: automated microbenchmarking library #812
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
Closed
Closed
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
1011141
Init: lind-perf
stupendoussuperpowers 4701467
Use new syscalls for benchmarks
stupendoussuperpowers 66ad51e
Use proper names for fdtables_syscall & libc_syscall
stupendoussuperpowers 0bf48c4
remove reduntant functions in perf.rs
stupendoussuperpowers 8ec9b69
Update benchmarking script
stupendoussuperpowers 139d402
add cfg's for mods. Use >2000 for syscalls that are benchmarks
stupendoussuperpowers d6276ba
2000..3000
stupendoussuperpowers d6cd8b2
Refactor lind-perf to be more readable and less of a monolith
stupendoussuperpowers 6a8b106
Add more docs
stupendoussuperpowers 485f857
Add even more docs
stupendoussuperpowers 8f3108a
Fix run_microbench.sh
stupendoussuperpowers dc143e8
fix lind_syscall.c
stupendoussuperpowers 95144fd
do not override upstream fs call changes
stupendoussuperpowers 6fb2206
A better lind-perf readme
stupendoussuperpowers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| #!/bin/bash | ||
|
|
||
| # Requires lind-boot to be built with the `lind_perf` feature. | ||
| # Use `make lind-boot-perf` for this. | ||
|
|
||
| set -euo pipefail | ||
|
|
||
|
|
||
| # Check if we need to re-exec with sudo | ||
| if [[ $EUID -ne 0 ]]; then | ||
| # Not running as root, re-exec with sudo | ||
| exec sudo -E "$0" "$@" | ||
| fi | ||
|
|
||
| SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" | ||
| REPO_ROOT="${SCRIPT_DIR%scripts}" | ||
| BENCH_ROOT="${REPO_ROOT}/tests/benchmarks" | ||
|
|
||
| echo "Compiling Tests..." | ||
|
|
||
| "${SCRIPT_DIR}/lind_compile" "${BENCH_ROOT}/libc_syscall.c" &>/dev/null && mv "${BENCH_ROOT}/libc_syscall.wasm" "${REPO_ROOT}/lindfs/" | ||
| "${SCRIPT_DIR}/lind_compile" "${BENCH_ROOT}/fdtables_syscall.c" &>/dev/null && mv "${BENCH_ROOT}/fdtables_syscall.wasm" "${REPO_ROOT}/lindfs/" | ||
| "${SCRIPT_DIR}/lind_compile" --compile-grate "${BENCH_ROOT}/grate_syscall.c" &>/dev/null && mv "${BENCH_ROOT}/grate_syscall.wasm" "${REPO_ROOT}/lindfs/" | ||
|
|
||
| echo -en "\nLIBC Test\t" | ||
| sudo lind-boot --perf libc_syscall.wasm | ||
|
|
||
| echo -en "\nFDTABLE Test\t" | ||
| sudo lind-boot --perf fdtables_syscall.wasm | ||
|
|
||
| echo -en "\nGRATE Test\t" | ||
| sudo lind-boot --perf grate_syscall.wasm libc_syscall.wasm |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| /// lind-perf related feature modules. | ||
| #[cfg(feature = "lind_perf")] | ||
| pub mod enabled { | ||
| use lind_perf::Counter; | ||
|
|
||
| /// Define a counter for close_virtualfd | ||
| pub static CLOSE_VIRTUALFD: Counter = Counter::new("fdtables::close_virtualfd"); | ||
|
|
||
| /// Define a list of all counters | ||
| pub static ALL_COUNTERS: &[&Counter] = &[&CLOSE_VIRTUALFD]; | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Could you also mention in comment about scenarios it might be used?