Skip to content

Commit

Permalink
Add test for austin (python profiler) input to flamegraph
Browse files Browse the repository at this point in the history
  • Loading branch information
mrob95 committed May 1, 2022
1 parent 9066b57 commit 12c8b0d
Show file tree
Hide file tree
Showing 3 changed files with 130 additions and 0 deletions.
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();
}

0 comments on commit 12c8b0d

Please sign in to comment.