Skip to content
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

Filter out lines which begin with '# ' in inferno-flamegraph #239

Merged
merged 3 commits into from
May 8, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add test for austin (python profiler) input to flamegraph
  • Loading branch information
mrob95 committed May 1, 2022
commit 12c8b0da6e6e3851dff6d16493017df1bbb9f306
114 changes: 114 additions & 0 deletions tests/data/flamegraph/austin/flame.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions tests/data/flamegraph/austin/flames.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# austin: 3.3.0
# interval: 100
# mode: wall

P6360;T6360;<frozen importlib._bootstrap>:_install_external_importers:1187;<frozen importlib._bootstrap>:_find_and_load:1007;<frozen importlib._bootstrap>:_find_and_load_unlocked:986;<frozen importlib._bootstrap>:_load_unlocked:680;<frozen importlib._bootstrap>:exec_module:838;<frozen importlib._bootstrap_external>:<module>:35;<frozen importlib._bootstrap>:_find_and_load:1007;<frozen importlib._bootstrap>:_find_and_load_unlocked:986;<frozen importlib._bootstrap>:_load_unlocked:680;<frozen importlib._bootstrap>:exec_module:768;<frozen importlib._bootstrap>:_call_with_frames_removed:228 105
P6360;T6360;<frozen importlib._bootstrap>:_install_external_importers:1187;<frozen importlib._bootstrap>:_find_and_load:1007;<frozen importlib._bootstrap>:_find_and_load_unlocked:986;<frozen importlib._bootstrap>:_load_unlocked:680;<frozen importlib._bootstrap>:exec_module:838;<frozen importlib._bootstrap_external>:<module>:828 186

# duration: 23873
8 changes: 8 additions & 0 deletions tests/flamegraph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -883,3 +883,11 @@ fn flamegraph_flamechart() {

test_flamegraph(input_file, expected_result_file, opts).unwrap();
}

#[test]
fn flamegraph_austin() {
let input_file = "./tests/data/flamegraph/austin/flames.txt";
let expected_result_file = "./tests/data/flamegraph/austin/flame.svg";
let opts = flamegraph::Options::default();
test_flamegraph(input_file, expected_result_file, opts).unwrap();
}