-
Notifications
You must be signed in to change notification settings - Fork 20
feat: add support for analysis mode #152
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
Open
not-matthias
wants to merge
9
commits into
main
Choose a base branch
from
cod-1711-codspeed-rust-add-analysis-mode-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
687784e
chore: add example with allocations
not-matthias c11500d
chore: bump instrument-hooks
not-matthias 56ca6f0
feat: add support for analysis mode
not-matthias 238398e
feat(cargo-codspeed): add analysis build mode
not-matthias 99785ae
chore(ci): add memory profiling
not-matthias 984f949
chore(ci): switch to OIDC auth
not-matthias 3d968aa
wip: use latest runner; run on staging
not-matthias 14c139f
fix: set runner mode
not-matthias d0a7e82
wip: use alpha runner release
not-matthias 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
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
Submodule instrument-hooks
updated
19 files
| +117 −0 | .github/workflows/ci.yml | |
| +5 −2 | Justfile | |
| +3,283 −2,735 | dist/core.c | |
| +36 −0 | includes/compat.h | |
| +1 −0 | includes/core.h | |
| +4 −0 | scripts/release.py | |
| +3 −1 | src/bincode.zig | |
| +0 −17 | src/c.zig | |
| +6 −0 | src/instruments/analysis.zig | |
| +61 −0 | src/instruments/fifo_instrument.zig | |
| +3 −155 | src/instruments/perf.zig | |
| +25 −14 | src/instruments/root.zig | |
| +5 −1 | src/instruments/valgrind.zig | |
| +190 −0 | src/runner_fifo.zig | |
| +20 −0 | src/shared.zig | |
| +52 −20 | src/tests/deserialize_rust/create_serialized.rs | |
| +29 −0 | src/tests/deserialize_rust/rust_deser.zig | |
| +138 −0 | src/tests/deserialize_rust/serialized.zig | |
| +34 −0 | src/utils.zig |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,3 +44,7 @@ harness = false | |
| [[bench]] | ||
| name = "counters" | ||
| harness = false | ||
|
|
||
| [[bench]] | ||
| name = "alloc" | ||
| harness = false | ||
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,40 @@ | ||
| use std::{ | ||
| alloc::Layout, | ||
| collections::{HashMap, HashSet}, | ||
| }; | ||
|
|
||
| #[divan::bench] | ||
| fn allocate() { | ||
| println!("Hello, world!"); | ||
|
|
||
| let vec = vec![1, 2, 3]; | ||
| println!("{vec:?}"); | ||
|
|
||
| let mut map = HashMap::new(); | ||
| map.insert("key", "value"); | ||
| println!("{map:?}"); | ||
|
|
||
| let mut set = HashSet::new(); | ||
| set.insert("apple"); | ||
| set.insert("banana"); | ||
| println!("{set:?}"); | ||
|
|
||
| std::thread::sleep(std::time::Duration::from_secs(1)); | ||
|
|
||
| let mut bytes_vec = vec![0u8; 0x100]; | ||
| println!("{:?}", bytes_vec.len()); | ||
|
|
||
| bytes_vec.extend(&vec![0u8; 0x1000]); | ||
|
|
||
| // Alloc 42 bytes of memory per iteration (4200 bytes total) | ||
| for _ in 0..100 { | ||
| let layout = Layout::new::<[u8; 42]>(); | ||
| let memory = unsafe { std::alloc::alloc(layout) }; | ||
| core::hint::black_box(memory); | ||
| unsafe { std::alloc::dealloc(memory, layout) }; | ||
| } | ||
| } | ||
|
|
||
| fn main() { | ||
| divan::main(); | ||
| } |
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.
Uh oh!
There was an error while loading. Please reload this page.