Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b3b4b1492a | ||
|
|
9cdceede15 | ||
|
|
741fdeb427 | ||
|
|
e9133be353 | ||
|
|
fcc1fa5689 | ||
|
|
0414c2f617 | ||
|
|
f23f65b3af | ||
|
|
8da9088ec1 | ||
|
|
81a6f29ad1 | ||
|
|
263f7d513e | ||
|
|
1bce806933 | ||
|
|
6493c5f66f | ||
|
|
639dae322b |
@@ -1,3 +1,25 @@
|
||||
## [1.15.2] - 2023-06-21
|
||||
|
||||
### Fixed
|
||||
|
||||
- Use more accurate line information for pprof profiles [[#430](https://github.com/jlfwong/speedscope/pull/430)] (by @dalehamel)
|
||||
- Stackprof: weight on-cpu samples by period rather than timestamp delta [[#425](https://github.com/jlfwong/speedscope/pull/425)] (by @manuelfelipe)
|
||||
- Prevent crashes when stackprof profiles frames are missing names [[#419](https://github.com/jlfwong/speedscope/pull/419)] (by @jez)
|
||||
- fix pprof defaultSampleType [[#424](https://github.com/jlfwong/speedscope/pull/424)] (by @vasi-stripe)
|
||||
|
||||
## [1.15.1] - 2023-06-04
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fix import from Chrome Devtools performance tab in Chrome >= 114 [[#422](https://github.com/jlfwong/speedscope/pull/422)]
|
||||
- Callgrind: Subposition compression and weight correction [[#423](https://github.com/jlfwong/speedscope/pull/423)]
|
||||
|
||||
## [1.15.0] - 2022-10-22
|
||||
|
||||
### Fixed
|
||||
|
||||
- Replace fuzzy matching with exact substring matching for finding matching frames [[#407](https://github.com/jlfwong/speedscope/pull/407)]
|
||||
|
||||
## [1.14.0] - 2022-05-19
|
||||
|
||||
### Added
|
||||
|
||||
Generated
+13
-10
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"name": "speedscope",
|
||||
"version": "1.13.0",
|
||||
"version": "1.15.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"version": "1.13.0",
|
||||
"name": "speedscope",
|
||||
"version": "1.15.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"open": "7.2.0"
|
||||
@@ -38,7 +39,7 @@
|
||||
"typescript": "4.2.3",
|
||||
"typescript-json-schema": "0.42.0",
|
||||
"uglify-es": "3.2.2",
|
||||
"uint8array-json-parser": "jlfwong/uint8array-json-parser#edce51ce"
|
||||
"uint8array-json-parser": "0.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/code-frame": {
|
||||
@@ -5843,6 +5844,7 @@
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.11.tgz",
|
||||
"integrity": "sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
@@ -14095,10 +14097,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/uint8array-json-parser": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "git+ssh://git@github.com/jlfwong/uint8array-json-parser.git#b4eb100aa3107b5829980171e1dee7d8bf35afe2",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
"version": "0.0.2",
|
||||
"resolved": "https://registry.npmjs.org/uint8array-json-parser/-/uint8array-json-parser-0.0.2.tgz",
|
||||
"integrity": "sha512-Cp5ycrI17rzdAkybRfZydr6XdLmOUfhm2jS1i35p3UY2G8TcT7fL+hmFY3zjMGNtoS8uSpdTS7NjiHh+LY/7Bg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/uncss": {
|
||||
"version": "0.17.3",
|
||||
@@ -26921,9 +26923,10 @@
|
||||
}
|
||||
},
|
||||
"uint8array-json-parser": {
|
||||
"version": "git+ssh://git@github.com/jlfwong/uint8array-json-parser.git#b4eb100aa3107b5829980171e1dee7d8bf35afe2",
|
||||
"dev": true,
|
||||
"from": "uint8array-json-parser@jlfwong/uint8array-json-parser#edce51ce"
|
||||
"version": "0.0.2",
|
||||
"resolved": "https://registry.npmjs.org/uint8array-json-parser/-/uint8array-json-parser-0.0.2.tgz",
|
||||
"integrity": "sha512-Cp5ycrI17rzdAkybRfZydr6XdLmOUfhm2jS1i35p3UY2G8TcT7fL+hmFY3zjMGNtoS8uSpdTS7NjiHh+LY/7Bg==",
|
||||
"dev": true
|
||||
},
|
||||
"uncss": {
|
||||
"version": "0.17.3",
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "speedscope",
|
||||
"version": "1.14.0",
|
||||
"version": "1.15.2",
|
||||
"description": "",
|
||||
"repository": "jlfwong/speedscope",
|
||||
"main": "index.js",
|
||||
@@ -54,7 +54,7 @@
|
||||
"typescript": "4.2.3",
|
||||
"typescript-json-schema": "0.42.0",
|
||||
"uglify-es": "3.2.2",
|
||||
"uint8array-json-parser": "jlfwong/uint8array-json-parser#edce51ce"
|
||||
"uint8array-json-parser": "0.0.2"
|
||||
},
|
||||
"jest": {
|
||||
"transform": {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,46 @@
|
||||
Weight Self Weight Symbol Name
|
||||
96.08 Gc 100.0% - example_app (40414)
|
||||
96.08 Gc 100.0% - start
|
||||
96.08 Gc 100.0% - main
|
||||
96.08 Gc 100.0% - std::rt::lang_start::hdba6f1ebfd1bdcf8
|
||||
96.08 Gc 100.0% - std::rt::lang_start_internal::hc453db0ee48af82e
|
||||
96.08 Gc 100.0% - std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::hd856f2663871206c
|
||||
96.08 Gc 100.0% - std::sys_common::backtrace::__rust_begin_short_backtrace::h4869fd82068bc1dc
|
||||
96.08 Gc 100.0% - core::ops::function::FnOnce::call_once::h06e0c27ee740c6a8
|
||||
96.08 Gc 100.0% - example_app::main::hddab13ae8d8b6a6e
|
||||
47.82 Gc 49.7% - example_app::example_a::h622d6879b734496d
|
||||
46.92 Gc 48.8% 404.75 Mc std::time::Instant::elapsed::h2e3793148fc23529
|
||||
45.92 Gc 47.7% 45.92 Gc mach_absolute_time
|
||||
600.78 Mc 0.6% 600.78 Mc std::time::Instant::elapsed::h2e3793148fc23529
|
||||
1.00 Mc 0.0% 1.00 Mc DYLD-STUB$$mach_absolute_time
|
||||
634.35 Mc 0.6% 634.35 Mc core::time::Duration::as_millis::hae6ad1b9cf7bb5ec
|
||||
181.50 Mc 0.1% 181.50 Mc example_app::example_a::h622d6879b734496d
|
||||
84.45 Mc 0.0% - example_app::example_b::h71b31fcd89b9ffd2
|
||||
81.45 Mc 0.0% - std::time::Instant::elapsed::h2e3793148fc23529
|
||||
80.45 Mc 0.0% 80.45 Mc mach_absolute_time
|
||||
1.00 Mc 0.0% 1.00 Mc std::time::Instant::elapsed::h2e3793148fc23529
|
||||
1.00 Mc 0.0% - example_app::example_c::h631759c10d7dee93
|
||||
1.00 Mc 0.0% - alloc::vec::Vec$LT$T$C$A$GT$::push::ha3426502ffc42c8b
|
||||
1.00 Mc 0.0% - alloc::raw_vec::RawVec$LT$T$C$A$GT$::reserve_for_push::he4a29b8274e35dbb
|
||||
1.00 Mc 0.0% - alloc::raw_vec::RawVec$LT$T$C$A$GT$::grow_amortized::h78db9ba423623c58
|
||||
1.00 Mc 0.0% - alloc::raw_vec::finish_grow::h876f5af1c66d74c8
|
||||
1.00 Mc 0.0% - _$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$::allocate::hcc733a40a34fbc94
|
||||
1.00 Mc 0.0% - alloc::alloc::Global::alloc_impl::hc55feba7d6266dfa
|
||||
1.00 Mc 0.0% - alloc::alloc::alloc::hfac63f3d6850b759
|
||||
1.00 Mc 0.0% - _malloc_zone_malloc
|
||||
1.00 Mc 0.0% - nanov2_malloc
|
||||
1.00 Mc 0.0% - nanov2_allocate
|
||||
1.00 Mc 0.0% - nanov2_allocate
|
||||
1.00 Mc 0.0% 1.00 Mc nanov2_find_block_and_allocate
|
||||
1.00 Mc 0.0% 1.00 Mc example_app::example_b::h71b31fcd89b9ffd2
|
||||
1.00 Mc 0.0% 1.00 Mc core::time::Duration::as_millis::hae6ad1b9cf7bb5ec
|
||||
47.45 Gc 49.3% 415.12 Mc std::time::Instant::elapsed::h2e3793148fc23529
|
||||
46.39 Gc 48.2% 46.39 Gc mach_absolute_time
|
||||
649.70 Mc 0.6% 649.70 Mc std::time::Instant::elapsed::h2e3793148fc23529
|
||||
614.22 Mc 0.6% 614.22 Mc core::time::Duration::as_millis::hae6ad1b9cf7bb5ec
|
||||
190.55 Mc 0.1% 190.55 Mc example_app::main::hddab13ae8d8b6a6e
|
||||
1.34 Kc 0.0% - std::io::stdio::_print::hdecfefdeb43586ed
|
||||
1.34 Kc 0.0% - _$LT$$RF$std..io..stdio..Stdout$u20$as$u20$std..io..Write$GT$::write_fmt::h2cb06dcd2b172844
|
||||
1.34 Kc 0.0% - core::fmt::write::hed96bcfc6342aee5
|
||||
532 cycles 0.0% - _$LT$std..io..Write..write_fmt..Adapter$LT$T$GT$$u20$as$u20$core..fmt..Write$GT$::write_str::hbe33ec23de24ce2f
|
||||
532 cycles 0.0% 532 cycles _$LT$std..io..stdio..StdoutLock$u20$as$u20$std..io..Write$GT$::write_all::h22667d0a03b2151b
|
||||
@@ -0,0 +1,30 @@
|
||||
# callgrind format
|
||||
events: Instructions
|
||||
|
||||
fl=alpha.c
|
||||
fn=alpha
|
||||
1 10
|
||||
cfl=beta.c
|
||||
cfn=beta
|
||||
calls=1 1
|
||||
1 10
|
||||
cfn=gamma
|
||||
calls=1 1
|
||||
1 10
|
||||
cfn=delta
|
||||
calls=1 1
|
||||
1 20
|
||||
|
||||
fn=delta
|
||||
1 10
|
||||
cfn=gamma
|
||||
calls=1 1
|
||||
1 10
|
||||
|
||||
fn=gamma
|
||||
1 10
|
||||
cfl=
|
||||
|
||||
fl=beta.c
|
||||
fn=beta
|
||||
1 10
|
||||
@@ -18,7 +18,7 @@ calls=3 51
|
||||
16 400 3000
|
||||
|
||||
fn=(2)
|
||||
51 100 4000
|
||||
51 100 15000
|
||||
cfi=(2)
|
||||
cfn=(3)
|
||||
calls=2 20
|
||||
@@ -26,4 +26,4 @@ calls=2 20
|
||||
|
||||
fl=(2)
|
||||
fn=(3)
|
||||
20 700 6000
|
||||
20 700 8000
|
||||
@@ -0,0 +1,24 @@
|
||||
# callgrind format
|
||||
events: Instructions
|
||||
|
||||
fl=file1.c
|
||||
fn=main
|
||||
16 20
|
||||
cfn=func1
|
||||
calls=1 50
|
||||
* 400
|
||||
cfi=file2.c
|
||||
cfn=func2
|
||||
calls=3 20
|
||||
* *
|
||||
|
||||
fn=func1
|
||||
+35 -300
|
||||
cfi=file2.c
|
||||
cfn=func2
|
||||
calls=2 20
|
||||
* 300
|
||||
|
||||
fl=file2.c
|
||||
fn=func2
|
||||
-31 +400
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -5,6 +5,7 @@ def a
|
||||
for i in 0..100 do
|
||||
b
|
||||
c
|
||||
e
|
||||
end
|
||||
end
|
||||
|
||||
@@ -28,8 +29,13 @@ def d
|
||||
prod
|
||||
end
|
||||
|
||||
profile = StackProf.run(mode: :wall, raw: true) do
|
||||
def e
|
||||
sleep 0.05
|
||||
end
|
||||
|
||||
mode = (ARGV[0] || :wall).to_sym
|
||||
profile = StackProf.run(mode: mode, raw: true) do
|
||||
a
|
||||
end
|
||||
|
||||
puts JSON.generate(profile)
|
||||
puts JSON.generate(profile)
|
||||
|
||||
+1
-1
@@ -58,5 +58,5 @@ echo "Build complete. Starting server on http://localhost:4444/"
|
||||
echo "Hit Ctrl+C to complete or cancel the release"
|
||||
echo
|
||||
echo
|
||||
python -m SimpleHTTPServer 4444 .
|
||||
python3 -m http.server 4444
|
||||
set +x
|
||||
|
||||
@@ -41,6 +41,61 @@ Object {
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`importFromCallgrind cfn reset 1`] = `
|
||||
Object {
|
||||
"frames": Array [
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "alpha.c",
|
||||
"key": "alpha.c:alpha",
|
||||
"line": undefined,
|
||||
"name": "alpha",
|
||||
"selfWeight": 10,
|
||||
"totalWeight": 50,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "beta.c",
|
||||
"key": "beta.c:beta",
|
||||
"line": undefined,
|
||||
"name": "beta",
|
||||
"selfWeight": 10,
|
||||
"totalWeight": 10,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "alpha.c",
|
||||
"key": "alpha.c:gamma",
|
||||
"line": undefined,
|
||||
"name": "gamma",
|
||||
"selfWeight": 20,
|
||||
"totalWeight": 20,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "alpha.c",
|
||||
"key": "alpha.c:delta",
|
||||
"line": undefined,
|
||||
"name": "delta",
|
||||
"selfWeight": 10,
|
||||
"totalWeight": 20,
|
||||
},
|
||||
],
|
||||
"name": "callgrind.cfn-reset.log -- Instructions",
|
||||
"stacks": Array [
|
||||
"alpha;beta 10",
|
||||
"alpha;gamma 10",
|
||||
"alpha;delta;gamma 10",
|
||||
"alpha;delta 10",
|
||||
"alpha 10",
|
||||
],
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`importFromCallgrind cfn reset: indexToView 1`] = `0`;
|
||||
|
||||
exports[`importFromCallgrind cfn reset: profileGroup.name 1`] = `"callgrind.cfn-reset.log"`;
|
||||
|
||||
exports[`importFromCallgrind multiple event types 1`] = `
|
||||
Object {
|
||||
"frames": Array [
|
||||
@@ -100,7 +155,7 @@ Object {
|
||||
"key": "file1.c:func1",
|
||||
"line": undefined,
|
||||
"name": "func1",
|
||||
"selfWeight": 8888.888888888889,
|
||||
"selfWeight": 15000,
|
||||
"totalWeight": 20000,
|
||||
},
|
||||
Frame {
|
||||
@@ -109,14 +164,14 @@ Object {
|
||||
"key": "file2.c:func2",
|
||||
"line": undefined,
|
||||
"name": "func2",
|
||||
"selfWeight": 14111.111111111111,
|
||||
"totalWeight": 14111.111111111111,
|
||||
"selfWeight": 8000,
|
||||
"totalWeight": 8000,
|
||||
},
|
||||
],
|
||||
"name": "callgrind.multiple-event-types.log -- Memory",
|
||||
"stacks": Array [
|
||||
"main;func1;func2 10.85 KB",
|
||||
"main;func1 8.68 KB",
|
||||
"main;func1;func2 4.88 KB",
|
||||
"main;func1 14.65 KB",
|
||||
"main;func2 2.93 KB",
|
||||
"main 14.65 KB",
|
||||
],
|
||||
@@ -172,6 +227,51 @@ exports[`importFromCallgrind name compression: indexToView 1`] = `0`;
|
||||
|
||||
exports[`importFromCallgrind name compression: profileGroup.name 1`] = `"callgrind.name-compression.log"`;
|
||||
|
||||
exports[`importFromCallgrind subposition compression 1`] = `
|
||||
Object {
|
||||
"frames": Array [
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "file1.c",
|
||||
"key": "file1.c:main",
|
||||
"line": undefined,
|
||||
"name": "main",
|
||||
"selfWeight": 20,
|
||||
"totalWeight": 820,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "file1.c",
|
||||
"key": "file1.c:func1",
|
||||
"line": undefined,
|
||||
"name": "func1",
|
||||
"selfWeight": 100,
|
||||
"totalWeight": 400,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "file2.c",
|
||||
"key": "file2.c:func2",
|
||||
"line": undefined,
|
||||
"name": "func2",
|
||||
"selfWeight": 700,
|
||||
"totalWeight": 700,
|
||||
},
|
||||
],
|
||||
"name": "callgrind.subposition-compression.log -- Instructions",
|
||||
"stacks": Array [
|
||||
"main;func1;func2 300",
|
||||
"main;func1 100",
|
||||
"main;func2 400",
|
||||
"main 20",
|
||||
],
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`importFromCallgrind subposition compression: indexToView 1`] = `0`;
|
||||
|
||||
exports[`importFromCallgrind subposition compression: profileGroup.name 1`] = `"callgrind.subposition-compression.log"`;
|
||||
|
||||
exports[`importFromCallgrind: indexToView 1`] = `0`;
|
||||
|
||||
exports[`importFromCallgrind: profileGroup.name 1`] = `"callgrind.example.log"`;
|
||||
|
||||
@@ -515,6 +515,192 @@ exports[`importFromChromeTimeline Chrome 69: indexToView 1`] = `0`;
|
||||
|
||||
exports[`importFromChromeTimeline Chrome 69: profileGroup.name 1`] = `"simple.json"`;
|
||||
|
||||
exports[`importFromChromeTimeline Chrome 116 1`] = `
|
||||
Object {
|
||||
"frames": Array [
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": "(program):undefined:undefined:undefined",
|
||||
"line": undefined,
|
||||
"name": "(program)",
|
||||
"selfWeight": 9312,
|
||||
"totalWeight": 9312,
|
||||
},
|
||||
Frame {
|
||||
"col": 1,
|
||||
"file": "file:///Users/jlfwong/code/speedscope/sample/programs/javascript/simple.js",
|
||||
"key": "(anonymous simple.js:1):file:///Users/jlfwong/code/speedscope/sample/programs/javascript/simple.js:1:1",
|
||||
"line": 1,
|
||||
"name": "(anonymous simple.js:1)",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 25866,
|
||||
},
|
||||
Frame {
|
||||
"col": 15,
|
||||
"file": "file:///Users/jlfwong/code/speedscope/sample/programs/javascript/simple.js",
|
||||
"key": "alpha:file:///Users/jlfwong/code/speedscope/sample/programs/javascript/simple.js:1:15",
|
||||
"line": 1,
|
||||
"name": "alpha",
|
||||
"selfWeight": 426,
|
||||
"totalWeight": 25866,
|
||||
},
|
||||
Frame {
|
||||
"col": 14,
|
||||
"file": "file:///Users/jlfwong/code/speedscope/sample/programs/javascript/simple.js",
|
||||
"key": "beta:file:///Users/jlfwong/code/speedscope/sample/programs/javascript/simple.js:8:14",
|
||||
"line": 8,
|
||||
"name": "beta",
|
||||
"selfWeight": 8028,
|
||||
"totalWeight": 12703,
|
||||
},
|
||||
Frame {
|
||||
"col": 15,
|
||||
"file": "file:///Users/jlfwong/code/speedscope/sample/programs/javascript/simple.js",
|
||||
"key": "gamma:file:///Users/jlfwong/code/speedscope/sample/programs/javascript/simple.js:20:15",
|
||||
"line": 20,
|
||||
"name": "gamma",
|
||||
"selfWeight": 8593,
|
||||
"totalWeight": 8593,
|
||||
},
|
||||
Frame {
|
||||
"col": 15,
|
||||
"file": "file:///Users/jlfwong/code/speedscope/sample/programs/javascript/simple.js",
|
||||
"key": "delta:file:///Users/jlfwong/code/speedscope/sample/programs/javascript/simple.js:14:15",
|
||||
"line": 14,
|
||||
"name": "delta",
|
||||
"selfWeight": 8169,
|
||||
"totalWeight": 12737,
|
||||
},
|
||||
],
|
||||
"name": "Trace-20230603T221323.json",
|
||||
"stacks": Array [
|
||||
" 4.39ms",
|
||||
"(program) 7.71ms",
|
||||
" 6.51ms",
|
||||
"(program) 267.00µs",
|
||||
" 122.00µs",
|
||||
"(program) 338.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta;gamma 297.00µs",
|
||||
"(anonymous simple.js:1);alpha 155.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 144.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 115.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta;gamma 145.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta;gamma 651.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta;gamma 267.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta;gamma 351.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta;gamma 603.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta;gamma 132.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta;gamma 259.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta;gamma 129.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta;gamma 130.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta;gamma 130.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta;gamma 254.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta;gamma 256.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta;gamma 258.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta;gamma 128.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta;gamma 107.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta;gamma 134.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta;gamma 132.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta;gamma 241.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta;gamma 128.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta;gamma 129.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta;gamma 259.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta;gamma 131.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta;gamma 131.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta;gamma 129.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 130.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta;gamma 133.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta;gamma 255.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta;gamma 250.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta;gamma 137.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta;gamma 137.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta;gamma 126.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta;gamma 116.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta;gamma 540.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta;gamma 107.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta;gamma 108.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta;gamma 118.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta;gamma 134.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta;gamma 139.00µs",
|
||||
"(anonymous simple.js:1);alpha 134.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta;gamma 135.00µs",
|
||||
"(anonymous simple.js:1);alpha 137.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta;gamma 275.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta;gamma 110.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta;gamma 262.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 246.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 259.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 129.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 129.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 241.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 611.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 133.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 354.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 226.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 226.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 106.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 125.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 368.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 496.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 129.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 107.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 387.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 130.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 129.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 258.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 239.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 446.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 494.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 132.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 264.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 245.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 129.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 129.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 260.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 128.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 129.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 258.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 130.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 258.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 129.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 130.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 260.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 130.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 128.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 275.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 241.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 258.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 257.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 258.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 137.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 405.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 937.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 269.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 134.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 269.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 136.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 272.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 133.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 542.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 945.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 270.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 406.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 409.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 140.00µs",
|
||||
"(anonymous simple.js:1);alpha;beta 135.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta 173.00µs",
|
||||
"(anonymous simple.js:1);alpha;delta;(program) 650.00µs",
|
||||
" 211.00µs",
|
||||
"(program) 348.00µs",
|
||||
],
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`importFromChromeTimeline Chrome 116: indexToView 1`] = `0`;
|
||||
|
||||
exports[`importFromChromeTimeline Chrome 116: profileGroup.name 1`] = `"Trace-20230603T221323.json"`;
|
||||
|
||||
exports[`importFromChromeTimeline Workers Chrome 66 1`] = `
|
||||
Object {
|
||||
"frames": Array [
|
||||
|
||||
@@ -99,10 +99,332 @@ Object {
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`importFromInstrumentsDeepCopy allocations profile 2`] = `
|
||||
Object {
|
||||
"frames": Array [
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":example_app (40414)",
|
||||
"line": undefined,
|
||||
"name": "example_app (40414)",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 96000000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":start",
|
||||
"line": undefined,
|
||||
"name": "start",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 96000000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":main",
|
||||
"line": undefined,
|
||||
"name": "main",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 96000000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":std::rt::lang_start::hdba6f1ebfd1bdcf8",
|
||||
"line": undefined,
|
||||
"name": "std::rt::lang_start::hdba6f1ebfd1bdcf8",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 96000000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":std::rt::lang_start_internal::hc453db0ee48af82e",
|
||||
"line": undefined,
|
||||
"name": "std::rt::lang_start_internal::hc453db0ee48af82e",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 96000000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::hd856f2663871206c",
|
||||
"line": undefined,
|
||||
"name": "std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::hd856f2663871206c",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 96000000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":std::sys_common::backtrace::__rust_begin_short_backtrace::h4869fd82068bc1dc",
|
||||
"line": undefined,
|
||||
"name": "std::sys_common::backtrace::__rust_begin_short_backtrace::h4869fd82068bc1dc",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 96000000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":core::ops::function::FnOnce::call_once::h06e0c27ee740c6a8",
|
||||
"line": undefined,
|
||||
"name": "core::ops::function::FnOnce::call_once::h06e0c27ee740c6a8",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 96000000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":example_app::main::hddab13ae8d8b6a6e",
|
||||
"line": undefined,
|
||||
"name": "example_app::main::hddab13ae8d8b6a6e",
|
||||
"selfWeight": 1385999000,
|
||||
"totalWeight": 96000000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":example_app::example_a::h622d6879b734496d",
|
||||
"line": undefined,
|
||||
"name": "example_app::example_a::h622d6879b734496d",
|
||||
"selfWeight": 282000000,
|
||||
"totalWeight": 47000000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":std::time::Instant::elapsed::h2e3793148fc23529",
|
||||
"line": undefined,
|
||||
"name": "std::time::Instant::elapsed::h2e3793148fc23529",
|
||||
"selfWeight": 2000000000,
|
||||
"totalWeight": 93081000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":mach_absolute_time",
|
||||
"line": undefined,
|
||||
"name": "mach_absolute_time",
|
||||
"selfWeight": 91080000000,
|
||||
"totalWeight": 91080000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":DYLD-STUB$$mach_absolute_time",
|
||||
"line": undefined,
|
||||
"name": "DYLD-STUB$$mach_absolute_time",
|
||||
"selfWeight": 1000000,
|
||||
"totalWeight": 1000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":core::time::Duration::as_millis::hae6ad1b9cf7bb5ec",
|
||||
"line": undefined,
|
||||
"name": "core::time::Duration::as_millis::hae6ad1b9cf7bb5ec",
|
||||
"selfWeight": 1249000000,
|
||||
"totalWeight": 1249000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":example_app::example_b::h71b31fcd89b9ffd2",
|
||||
"line": undefined,
|
||||
"name": "example_app::example_b::h71b31fcd89b9ffd2",
|
||||
"selfWeight": 1000000,
|
||||
"totalWeight": 84000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":example_app::example_c::h631759c10d7dee93",
|
||||
"line": undefined,
|
||||
"name": "example_app::example_c::h631759c10d7dee93",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":alloc::vec::Vec$LT$T$C$A$GT$::push::ha3426502ffc42c8b",
|
||||
"line": undefined,
|
||||
"name": "alloc::vec::Vec$LT$T$C$A$GT$::push::ha3426502ffc42c8b",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":alloc::raw_vec::RawVec$LT$T$C$A$GT$::reserve_for_push::he4a29b8274e35dbb",
|
||||
"line": undefined,
|
||||
"name": "alloc::raw_vec::RawVec$LT$T$C$A$GT$::reserve_for_push::he4a29b8274e35dbb",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":alloc::raw_vec::RawVec$LT$T$C$A$GT$::grow_amortized::h78db9ba423623c58",
|
||||
"line": undefined,
|
||||
"name": "alloc::raw_vec::RawVec$LT$T$C$A$GT$::grow_amortized::h78db9ba423623c58",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":alloc::raw_vec::finish_grow::h876f5af1c66d74c8",
|
||||
"line": undefined,
|
||||
"name": "alloc::raw_vec::finish_grow::h876f5af1c66d74c8",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$::allocate::hcc733a40a34fbc94",
|
||||
"line": undefined,
|
||||
"name": "_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$::allocate::hcc733a40a34fbc94",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":alloc::alloc::Global::alloc_impl::hc55feba7d6266dfa",
|
||||
"line": undefined,
|
||||
"name": "alloc::alloc::Global::alloc_impl::hc55feba7d6266dfa",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":alloc::alloc::alloc::hfac63f3d6850b759",
|
||||
"line": undefined,
|
||||
"name": "alloc::alloc::alloc::hfac63f3d6850b759",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":_malloc_zone_malloc",
|
||||
"line": undefined,
|
||||
"name": "_malloc_zone_malloc",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":nanov2_malloc",
|
||||
"line": undefined,
|
||||
"name": "nanov2_malloc",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":nanov2_allocate",
|
||||
"line": undefined,
|
||||
"name": "nanov2_allocate",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":nanov2_find_block_and_allocate",
|
||||
"line": undefined,
|
||||
"name": "nanov2_find_block_and_allocate",
|
||||
"selfWeight": 1000000,
|
||||
"totalWeight": 1000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":std::io::stdio::_print::hdecfefdeb43586ed",
|
||||
"line": undefined,
|
||||
"name": "std::io::stdio::_print::hdecfefdeb43586ed",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":_$LT$$RF$std..io..stdio..Stdout$u20$as$u20$std..io..Write$GT$::write_fmt::h2cb06dcd2b172844",
|
||||
"line": undefined,
|
||||
"name": "_$LT$$RF$std..io..stdio..Stdout$u20$as$u20$std..io..Write$GT$::write_fmt::h2cb06dcd2b172844",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":core::fmt::write::hed96bcfc6342aee5",
|
||||
"line": undefined,
|
||||
"name": "core::fmt::write::hed96bcfc6342aee5",
|
||||
"selfWeight": 468,
|
||||
"totalWeight": 1000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":_$LT$std..io..Write..write_fmt..Adapter$LT$T$GT$$u20$as$u20$core..fmt..Write$GT$::write_str::hbe33ec23de24ce2f",
|
||||
"line": undefined,
|
||||
"name": "_$LT$std..io..Write..write_fmt..Adapter$LT$T$GT$$u20$as$u20$core..fmt..Write$GT$::write_str::hbe33ec23de24ce2f",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 532,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":_$LT$std..io..stdio..StdoutLock$u20$as$u20$std..io..Write$GT$::write_all::h22667d0a03b2151b",
|
||||
"line": undefined,
|
||||
"name": "_$LT$std..io..stdio..StdoutLock$u20$as$u20$std..io..Write$GT$::write_all::h22667d0a03b2151b",
|
||||
"selfWeight": 532,
|
||||
"totalWeight": 532,
|
||||
},
|
||||
],
|
||||
"name": "cycles-example-deep-copy.txt",
|
||||
"stacks": Array [
|
||||
"example_app (40414);start;main;std::rt::lang_start::hdba6f1ebfd1bdcf8;std::rt::lang_start_internal::hc453db0ee48af82e;std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::hd856f2663871206c;std::sys_common::backtrace::__rust_begin_short_backtrace::h4869fd82068bc1dc;core::ops::function::FnOnce::call_once::h06e0c27ee740c6a8;example_app::main::hddab13ae8d8b6a6e;example_app::example_a::h622d6879b734496d;std::time::Instant::elapsed::h2e3793148fc23529;mach_absolute_time 750000:00",
|
||||
"example_app (40414);start;main;std::rt::lang_start::hdba6f1ebfd1bdcf8;std::rt::lang_start_internal::hc453db0ee48af82e;std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::hd856f2663871206c;std::sys_common::backtrace::__rust_begin_short_backtrace::h4869fd82068bc1dc;core::ops::function::FnOnce::call_once::h06e0c27ee740c6a8;example_app::main::hddab13ae8d8b6a6e;example_app::example_a::h622d6879b734496d;std::time::Instant::elapsed::h2e3793148fc23529;std::time::Instant::elapsed::h2e3793148fc23529 10000:00",
|
||||
"example_app (40414);start;main;std::rt::lang_start::hdba6f1ebfd1bdcf8;std::rt::lang_start_internal::hc453db0ee48af82e;std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::hd856f2663871206c;std::sys_common::backtrace::__rust_begin_short_backtrace::h4869fd82068bc1dc;core::ops::function::FnOnce::call_once::h06e0c27ee740c6a8;example_app::main::hddab13ae8d8b6a6e;example_app::example_a::h622d6879b734496d;std::time::Instant::elapsed::h2e3793148fc23529;DYLD-STUB$$mach_absolute_time 16:40",
|
||||
"example_app (40414);start;main;std::rt::lang_start::hdba6f1ebfd1bdcf8;std::rt::lang_start_internal::hc453db0ee48af82e;std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::hd856f2663871206c;std::sys_common::backtrace::__rust_begin_short_backtrace::h4869fd82068bc1dc;core::ops::function::FnOnce::call_once::h06e0c27ee740c6a8;example_app::main::hddab13ae8d8b6a6e;example_app::example_a::h622d6879b734496d;std::time::Instant::elapsed::h2e3793148fc23529 6650:00",
|
||||
"example_app (40414);start;main;std::rt::lang_start::hdba6f1ebfd1bdcf8;std::rt::lang_start_internal::hc453db0ee48af82e;std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::hd856f2663871206c;std::sys_common::backtrace::__rust_begin_short_backtrace::h4869fd82068bc1dc;core::ops::function::FnOnce::call_once::h06e0c27ee740c6a8;example_app::main::hddab13ae8d8b6a6e;example_app::example_a::h622d6879b734496d;core::time::Duration::as_millis::hae6ad1b9cf7bb5ec 10566:40",
|
||||
"example_app (40414);start;main;std::rt::lang_start::hdba6f1ebfd1bdcf8;std::rt::lang_start_internal::hc453db0ee48af82e;std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::hd856f2663871206c;std::sys_common::backtrace::__rust_begin_short_backtrace::h4869fd82068bc1dc;core::ops::function::FnOnce::call_once::h06e0c27ee740c6a8;example_app::main::hddab13ae8d8b6a6e;example_app::example_a::h622d6879b734496d;example_app::example_a::h622d6879b734496d 3016:40",
|
||||
"example_app (40414);start;main;std::rt::lang_start::hdba6f1ebfd1bdcf8;std::rt::lang_start_internal::hc453db0ee48af82e;std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::hd856f2663871206c;std::sys_common::backtrace::__rust_begin_short_backtrace::h4869fd82068bc1dc;core::ops::function::FnOnce::call_once::h06e0c27ee740c6a8;example_app::main::hddab13ae8d8b6a6e;example_app::example_a::h622d6879b734496d;example_app::example_b::h71b31fcd89b9ffd2;std::time::Instant::elapsed::h2e3793148fc23529;mach_absolute_time 1333:20",
|
||||
"example_app (40414);start;main;std::rt::lang_start::hdba6f1ebfd1bdcf8;std::rt::lang_start_internal::hc453db0ee48af82e;std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::hd856f2663871206c;std::sys_common::backtrace::__rust_begin_short_backtrace::h4869fd82068bc1dc;core::ops::function::FnOnce::call_once::h06e0c27ee740c6a8;example_app::main::hddab13ae8d8b6a6e;example_app::example_a::h622d6879b734496d;example_app::example_b::h71b31fcd89b9ffd2;std::time::Instant::elapsed::h2e3793148fc23529;std::time::Instant::elapsed::h2e3793148fc23529 16:40",
|
||||
"example_app (40414);start;main;std::rt::lang_start::hdba6f1ebfd1bdcf8;std::rt::lang_start_internal::hc453db0ee48af82e;std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::hd856f2663871206c;std::sys_common::backtrace::__rust_begin_short_backtrace::h4869fd82068bc1dc;core::ops::function::FnOnce::call_once::h06e0c27ee740c6a8;example_app::main::hddab13ae8d8b6a6e;example_app::example_a::h622d6879b734496d;example_app::example_b::h71b31fcd89b9ffd2;example_app::example_c::h631759c10d7dee93;alloc::vec::Vec$LT$T$C$A$GT$::push::ha3426502ffc42c8b;alloc::raw_vec::RawVec$LT$T$C$A$GT$::reserve_for_push::he4a29b8274e35dbb;alloc::raw_vec::RawVec$LT$T$C$A$GT$::grow_amortized::h78db9ba423623c58;alloc::raw_vec::finish_grow::h876f5af1c66d74c8;_$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$::allocate::hcc733a40a34fbc94;alloc::alloc::Global::alloc_impl::hc55feba7d6266dfa;alloc::alloc::alloc::hfac63f3d6850b759;_malloc_zone_malloc;nanov2_malloc;nanov2_allocate;nanov2_allocate;nanov2_find_block_and_allocate 16:40",
|
||||
"example_app (40414);start;main;std::rt::lang_start::hdba6f1ebfd1bdcf8;std::rt::lang_start_internal::hc453db0ee48af82e;std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::hd856f2663871206c;std::sys_common::backtrace::__rust_begin_short_backtrace::h4869fd82068bc1dc;core::ops::function::FnOnce::call_once::h06e0c27ee740c6a8;example_app::main::hddab13ae8d8b6a6e;example_app::example_a::h622d6879b734496d;example_app::example_b::h71b31fcd89b9ffd2;example_app::example_b::h71b31fcd89b9ffd2 16:40",
|
||||
"example_app (40414);start;main;std::rt::lang_start::hdba6f1ebfd1bdcf8;std::rt::lang_start_internal::hc453db0ee48af82e;std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::hd856f2663871206c;std::sys_common::backtrace::__rust_begin_short_backtrace::h4869fd82068bc1dc;core::ops::function::FnOnce::call_once::h06e0c27ee740c6a8;example_app::main::hddab13ae8d8b6a6e;example_app::example_a::h622d6879b734496d;example_app::example_b::h71b31fcd89b9ffd2;core::time::Duration::as_millis::hae6ad1b9cf7bb5ec 16:40",
|
||||
"example_app (40414);start;main;std::rt::lang_start::hdba6f1ebfd1bdcf8;std::rt::lang_start_internal::hc453db0ee48af82e;std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::hd856f2663871206c;std::sys_common::backtrace::__rust_begin_short_backtrace::h4869fd82068bc1dc;core::ops::function::FnOnce::call_once::h06e0c27ee740c6a8;example_app::main::hddab13ae8d8b6a6e;example_app::example_a::h622d6879b734496d 1683:20",
|
||||
"example_app (40414);start;main;std::rt::lang_start::hdba6f1ebfd1bdcf8;std::rt::lang_start_internal::hc453db0ee48af82e;std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::hd856f2663871206c;std::sys_common::backtrace::__rust_begin_short_backtrace::h4869fd82068bc1dc;core::ops::function::FnOnce::call_once::h06e0c27ee740c6a8;example_app::main::hddab13ae8d8b6a6e;std::time::Instant::elapsed::h2e3793148fc23529;mach_absolute_time 766666:40",
|
||||
"example_app (40414);start;main;std::rt::lang_start::hdba6f1ebfd1bdcf8;std::rt::lang_start_internal::hc453db0ee48af82e;std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::hd856f2663871206c;std::sys_common::backtrace::__rust_begin_short_backtrace::h4869fd82068bc1dc;core::ops::function::FnOnce::call_once::h06e0c27ee740c6a8;example_app::main::hddab13ae8d8b6a6e;std::time::Instant::elapsed::h2e3793148fc23529;std::time::Instant::elapsed::h2e3793148fc23529 10816:40",
|
||||
"example_app (40414);start;main;std::rt::lang_start::hdba6f1ebfd1bdcf8;std::rt::lang_start_internal::hc453db0ee48af82e;std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::hd856f2663871206c;std::sys_common::backtrace::__rust_begin_short_backtrace::h4869fd82068bc1dc;core::ops::function::FnOnce::call_once::h06e0c27ee740c6a8;example_app::main::hddab13ae8d8b6a6e;std::time::Instant::elapsed::h2e3793148fc23529 5850:00",
|
||||
"example_app (40414);start;main;std::rt::lang_start::hdba6f1ebfd1bdcf8;std::rt::lang_start_internal::hc453db0ee48af82e;std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::hd856f2663871206c;std::sys_common::backtrace::__rust_begin_short_backtrace::h4869fd82068bc1dc;core::ops::function::FnOnce::call_once::h06e0c27ee740c6a8;example_app::main::hddab13ae8d8b6a6e;core::time::Duration::as_millis::hae6ad1b9cf7bb5ec 10233:20",
|
||||
"example_app (40414);start;main;std::rt::lang_start::hdba6f1ebfd1bdcf8;std::rt::lang_start_internal::hc453db0ee48af82e;std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::hd856f2663871206c;std::sys_common::backtrace::__rust_begin_short_backtrace::h4869fd82068bc1dc;core::ops::function::FnOnce::call_once::h06e0c27ee740c6a8;example_app::main::hddab13ae8d8b6a6e;example_app::main::hddab13ae8d8b6a6e 3166:40",
|
||||
"example_app (40414);start;main;std::rt::lang_start::hdba6f1ebfd1bdcf8;std::rt::lang_start_internal::hc453db0ee48af82e;std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::hd856f2663871206c;std::sys_common::backtrace::__rust_begin_short_backtrace::h4869fd82068bc1dc;core::ops::function::FnOnce::call_once::h06e0c27ee740c6a8;example_app::main::hddab13ae8d8b6a6e;std::io::stdio::_print::hdecfefdeb43586ed;_$LT$$RF$std..io..stdio..Stdout$u20$as$u20$std..io..Write$GT$::write_fmt::h2cb06dcd2b172844;core::fmt::write::hed96bcfc6342aee5;_$LT$std..io..Write..write_fmt..Adapter$LT$T$GT$$u20$as$u20$core..fmt..Write$GT$::write_str::hbe33ec23de24ce2f;_$LT$std..io..stdio..StdoutLock$u20$as$u20$std..io..Write$GT$::write_all::h22667d0a03b2151b 532.00ms",
|
||||
"example_app (40414);start;main;std::rt::lang_start::hdba6f1ebfd1bdcf8;std::rt::lang_start_internal::hc453db0ee48af82e;std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::hd856f2663871206c;std::sys_common::backtrace::__rust_begin_short_backtrace::h4869fd82068bc1dc;core::ops::function::FnOnce::call_once::h06e0c27ee740c6a8;example_app::main::hddab13ae8d8b6a6e;std::io::stdio::_print::hdecfefdeb43586ed;_$LT$$RF$std..io..stdio..Stdout$u20$as$u20$std..io..Write$GT$::write_fmt::h2cb06dcd2b172844;core::fmt::write::hed96bcfc6342aee5 468.00ms",
|
||||
"example_app (40414);start;main;std::rt::lang_start::hdba6f1ebfd1bdcf8;std::rt::lang_start_internal::hc453db0ee48af82e;std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::hd856f2663871206c;std::sys_common::backtrace::__rust_begin_short_backtrace::h4869fd82068bc1dc;core::ops::function::FnOnce::call_once::h06e0c27ee740c6a8;example_app::main::hddab13ae8d8b6a6e 19933:19",
|
||||
],
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`importFromInstrumentsDeepCopy allocations profile: indexToView 1`] = `0`;
|
||||
|
||||
exports[`importFromInstrumentsDeepCopy allocations profile: indexToView 2`] = `0`;
|
||||
|
||||
exports[`importFromInstrumentsDeepCopy allocations profile: profileGroup.name 1`] = `"random-allocations-deep-copy.txt"`;
|
||||
|
||||
exports[`importFromInstrumentsDeepCopy allocations profile: profileGroup.name 2`] = `"cycles-example-deep-copy.txt"`;
|
||||
|
||||
exports[`importFromInstrumentsDeepCopy time profile 1`] = `
|
||||
Object {
|
||||
"frames": Array [
|
||||
|
||||
@@ -7,239 +7,239 @@ Object {
|
||||
"col": undefined,
|
||||
"file": "/usr/local/Cellar/go/1.10.1/libexec/src/runtime/proc.go",
|
||||
"key": "runtime.main:/usr/local/Cellar/go/1.10.1/libexec/src/runtime/proc.go:0",
|
||||
"line": 0,
|
||||
"line": 198,
|
||||
"name": "runtime.main",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 136,
|
||||
"totalWeight": 1360000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/Users/jlfwong/code/speedscope/sample/programs/go/simple.go",
|
||||
"key": "main.main:/Users/jlfwong/code/speedscope/sample/programs/go/simple.go:0",
|
||||
"line": 0,
|
||||
"line": 49,
|
||||
"name": "main.main",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 136,
|
||||
"totalWeight": 1360000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/Users/jlfwong/code/speedscope/sample/programs/go/simple.go",
|
||||
"key": "main.delta:/Users/jlfwong/code/speedscope/sample/programs/go/simple.go:0",
|
||||
"line": 0,
|
||||
"line": 28,
|
||||
"name": "main.delta",
|
||||
"selfWeight": 22,
|
||||
"totalWeight": 58,
|
||||
"selfWeight": 220000000,
|
||||
"totalWeight": 580000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/Users/jlfwong/code/speedscope/sample/programs/go/simple.go",
|
||||
"key": "main.beta:/Users/jlfwong/code/speedscope/sample/programs/go/simple.go:0",
|
||||
"line": 0,
|
||||
"line": 18,
|
||||
"name": "main.beta",
|
||||
"selfWeight": 39,
|
||||
"totalWeight": 39,
|
||||
"selfWeight": 390000000,
|
||||
"totalWeight": 390000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/Users/jlfwong/code/speedscope/sample/programs/go/simple.go",
|
||||
"key": "main.alpha:/Users/jlfwong/code/speedscope/sample/programs/go/simple.go:0",
|
||||
"line": 0,
|
||||
"line": 11,
|
||||
"name": "main.alpha",
|
||||
"selfWeight": 48,
|
||||
"totalWeight": 48,
|
||||
"selfWeight": 480000000,
|
||||
"totalWeight": 480000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/Users/jlfwong/code/speedscope/sample/programs/go/simple.go",
|
||||
"key": "main.gamma:/Users/jlfwong/code/speedscope/sample/programs/go/simple.go:0",
|
||||
"line": 0,
|
||||
"line": 34,
|
||||
"name": "main.gamma",
|
||||
"selfWeight": 27,
|
||||
"totalWeight": 27,
|
||||
"selfWeight": 270000000,
|
||||
"totalWeight": 270000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/usr/local/Cellar/go/1.10.1/libexec/src/runtime/asm_amd64.s",
|
||||
"key": "runtime.morestack:/usr/local/Cellar/go/1.10.1/libexec/src/runtime/asm_amd64.s:0",
|
||||
"line": 0,
|
||||
"line": 480,
|
||||
"name": "runtime.morestack",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 11,
|
||||
"totalWeight": 110000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/usr/local/Cellar/go/1.10.1/libexec/src/runtime/stack.go",
|
||||
"key": "runtime.newstack:/usr/local/Cellar/go/1.10.1/libexec/src/runtime/stack.go:0",
|
||||
"line": 0,
|
||||
"line": 957,
|
||||
"name": "runtime.newstack",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 11,
|
||||
"totalWeight": 110000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/usr/local/Cellar/go/1.10.1/libexec/src/runtime/duff_amd64.s",
|
||||
"key": "runtime.duffcopy:/usr/local/Cellar/go/1.10.1/libexec/src/runtime/duff_amd64.s:0",
|
||||
"line": 0,
|
||||
"line": 412,
|
||||
"name": "runtime.duffcopy",
|
||||
"selfWeight": 11,
|
||||
"totalWeight": 11,
|
||||
"selfWeight": 110000000,
|
||||
"totalWeight": 110000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/usr/local/Cellar/go/1.10.1/libexec/src/runtime/time.go",
|
||||
"key": "runtime.timerproc:/usr/local/Cellar/go/1.10.1/libexec/src/runtime/time.go:0",
|
||||
"line": 0,
|
||||
"line": 247,
|
||||
"name": "runtime.timerproc",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1,
|
||||
"totalWeight": 10000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/usr/local/Cellar/go/1.10.1/libexec/src/runtime/time.go",
|
||||
"key": "runtime.goroutineReady:/usr/local/Cellar/go/1.10.1/libexec/src/runtime/time.go:0",
|
||||
"line": 0,
|
||||
"line": 125,
|
||||
"name": "runtime.goroutineReady",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1,
|
||||
"totalWeight": 10000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/usr/local/Cellar/go/1.10.1/libexec/src/runtime/proc.go",
|
||||
"key": "runtime.goready:/usr/local/Cellar/go/1.10.1/libexec/src/runtime/proc.go:0",
|
||||
"line": 0,
|
||||
"line": 301,
|
||||
"name": "runtime.goready",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1,
|
||||
"totalWeight": 10000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/usr/local/Cellar/go/1.10.1/libexec/src/runtime/asm_amd64.s",
|
||||
"key": "runtime.systemstack:/usr/local/Cellar/go/1.10.1/libexec/src/runtime/asm_amd64.s:0",
|
||||
"line": 0,
|
||||
"line": 409,
|
||||
"name": "runtime.systemstack",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1,
|
||||
"totalWeight": 10000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/usr/local/Cellar/go/1.10.1/libexec/src/runtime/proc.go",
|
||||
"key": "runtime.goready.func1:/usr/local/Cellar/go/1.10.1/libexec/src/runtime/proc.go:0",
|
||||
"line": 0,
|
||||
"line": 302,
|
||||
"name": "runtime.goready.func1",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1,
|
||||
"totalWeight": 10000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/usr/local/Cellar/go/1.10.1/libexec/src/runtime/proc.go",
|
||||
"key": "runtime.ready:/usr/local/Cellar/go/1.10.1/libexec/src/runtime/proc.go:0",
|
||||
"line": 0,
|
||||
"line": 608,
|
||||
"name": "runtime.ready",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1,
|
||||
"totalWeight": 10000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/usr/local/Cellar/go/1.10.1/libexec/src/runtime/proc.go",
|
||||
"key": "runtime.wakep:/usr/local/Cellar/go/1.10.1/libexec/src/runtime/proc.go:0",
|
||||
"line": 0,
|
||||
"line": 2083,
|
||||
"name": "runtime.wakep",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1,
|
||||
"totalWeight": 10000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/usr/local/Cellar/go/1.10.1/libexec/src/runtime/proc.go",
|
||||
"key": "runtime.startm:/usr/local/Cellar/go/1.10.1/libexec/src/runtime/proc.go:0",
|
||||
"line": 0,
|
||||
"line": 2017,
|
||||
"name": "runtime.startm",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1,
|
||||
"totalWeight": 10000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/usr/local/Cellar/go/1.10.1/libexec/src/runtime/lock_sema.go",
|
||||
"key": "runtime.notewakeup:/usr/local/Cellar/go/1.10.1/libexec/src/runtime/lock_sema.go:0",
|
||||
"line": 0,
|
||||
"line": 147,
|
||||
"name": "runtime.notewakeup",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1,
|
||||
"totalWeight": 10000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/usr/local/Cellar/go/1.10.1/libexec/src/runtime/os_darwin.go",
|
||||
"key": "runtime.semawakeup:/usr/local/Cellar/go/1.10.1/libexec/src/runtime/os_darwin.go:0",
|
||||
"line": 0,
|
||||
"line": 36,
|
||||
"name": "runtime.semawakeup",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1,
|
||||
"totalWeight": 10000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/usr/local/Cellar/go/1.10.1/libexec/src/runtime/os_darwin.go",
|
||||
"key": "runtime.mach_semrelease:/usr/local/Cellar/go/1.10.1/libexec/src/runtime/os_darwin.go:0",
|
||||
"line": 0,
|
||||
"line": 465,
|
||||
"name": "runtime.mach_semrelease",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1,
|
||||
"totalWeight": 10000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/usr/local/Cellar/go/1.10.1/libexec/src/runtime/sys_darwin_amd64.s",
|
||||
"key": "runtime.mach_semaphore_signal:/usr/local/Cellar/go/1.10.1/libexec/src/runtime/sys_darwin_amd64.s:0",
|
||||
"line": 0,
|
||||
"line": 558,
|
||||
"name": "runtime.mach_semaphore_signal",
|
||||
"selfWeight": 1,
|
||||
"totalWeight": 1,
|
||||
"selfWeight": 10000000,
|
||||
"totalWeight": 10000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/usr/local/Cellar/go/1.10.1/libexec/src/runtime/proc.go",
|
||||
"key": "runtime.mstart:/usr/local/Cellar/go/1.10.1/libexec/src/runtime/proc.go:0",
|
||||
"line": 0,
|
||||
"line": 1193,
|
||||
"name": "runtime.mstart",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 2,
|
||||
"totalWeight": 20000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/usr/local/Cellar/go/1.10.1/libexec/src/runtime/proc.go",
|
||||
"key": "runtime.mstart1:/usr/local/Cellar/go/1.10.1/libexec/src/runtime/proc.go:0",
|
||||
"line": 0,
|
||||
"line": 1227,
|
||||
"name": "runtime.mstart1",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 2,
|
||||
"totalWeight": 20000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/usr/local/Cellar/go/1.10.1/libexec/src/runtime/proc.go",
|
||||
"key": "runtime.sysmon:/usr/local/Cellar/go/1.10.1/libexec/src/runtime/proc.go:0",
|
||||
"line": 0,
|
||||
"line": 4221,
|
||||
"name": "runtime.sysmon",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 2,
|
||||
"totalWeight": 20000000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/usr/local/Cellar/go/1.10.1/libexec/src/runtime/sys_darwin_amd64.s",
|
||||
"key": "runtime.usleep:/usr/local/Cellar/go/1.10.1/libexec/src/runtime/sys_darwin_amd64.s:0",
|
||||
"line": 0,
|
||||
"line": 418,
|
||||
"name": "runtime.usleep",
|
||||
"selfWeight": 2,
|
||||
"totalWeight": 2,
|
||||
"selfWeight": 20000000,
|
||||
"totalWeight": 20000000,
|
||||
},
|
||||
],
|
||||
"name": "simple.prof",
|
||||
"stacks": Array [
|
||||
"runtime.main;main.main;main.delta;main.beta 14",
|
||||
"runtime.main;main.main;main.alpha 26",
|
||||
"runtime.main;main.main;main.gamma 27",
|
||||
"runtime.morestack;runtime.newstack;runtime.duffcopy 11",
|
||||
"runtime.main;main.main;main.beta 25",
|
||||
"runtime.main;main.main;main.delta 22",
|
||||
"runtime.main;main.main;main.delta;main.alpha 22",
|
||||
"runtime.timerproc;runtime.goroutineReady;runtime.goready;runtime.systemstack;runtime.goready.func1;runtime.ready;runtime.wakep;runtime.startm;runtime.notewakeup;runtime.semawakeup;runtime.mach_semrelease;runtime.mach_semaphore_signal 1",
|
||||
"runtime.mstart;runtime.mstart1;runtime.sysmon;runtime.usleep 2",
|
||||
"runtime.main;main.main;main.delta;main.beta 140.00ms",
|
||||
"runtime.main;main.main;main.alpha 260.00ms",
|
||||
"runtime.main;main.main;main.gamma 270.00ms",
|
||||
"runtime.morestack;runtime.newstack;runtime.duffcopy 110.00ms",
|
||||
"runtime.main;main.main;main.beta 250.00ms",
|
||||
"runtime.main;main.main;main.delta 220.00ms",
|
||||
"runtime.main;main.main;main.delta;main.alpha 220.00ms",
|
||||
"runtime.timerproc;runtime.goroutineReady;runtime.goready;runtime.systemstack;runtime.goready.func1;runtime.ready;runtime.wakep;runtime.startm;runtime.notewakeup;runtime.semawakeup;runtime.mach_semrelease;runtime.mach_semaphore_signal 10.00ms",
|
||||
"runtime.mstart;runtime.mstart1;runtime.sysmon;runtime.usleep 20.00ms",
|
||||
],
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,5 +1,453 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`importCpuProfileWithProperWeights importFromStackprof cpu mode snapshot 1`] = `
|
||||
Object {
|
||||
"frames": Array [
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "sample/programs/ruby/simple.rb",
|
||||
"key": 5352342240,
|
||||
"line": undefined,
|
||||
"name": "<main>",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 410000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/Users/mcorrea/src/github.com/dalehamel/speedscope/sample/programs/ruby/simple.rb",
|
||||
"key": 4530376200,
|
||||
"line": undefined,
|
||||
"name": "<main>",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 410000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/Users/mcorrea/src/github.com/dalehamel/speedscope/sample/programs/ruby/simple.rb",
|
||||
"key": 4530486680,
|
||||
"line": 37,
|
||||
"name": "block in <main>",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 410000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/Users/mcorrea/src/github.com/dalehamel/speedscope/sample/programs/ruby/simple.rb",
|
||||
"key": 5335911080,
|
||||
"line": 4,
|
||||
"name": "Object#a",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 410000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/Users/mcorrea/src/github.com/dalehamel/speedscope/sample/programs/ruby/simple.rb",
|
||||
"key": 5335911040,
|
||||
"line": 12,
|
||||
"name": "Object#b",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 154000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/Users/mcorrea/src/github.com/dalehamel/speedscope/sample/programs/ruby/simple.rb",
|
||||
"key": 5335909920,
|
||||
"line": 24,
|
||||
"name": "Object#d",
|
||||
"selfWeight": 331000,
|
||||
"totalWeight": 331000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/Users/mcorrea/src/github.com/dalehamel/speedscope/sample/programs/ruby/simple.rb",
|
||||
"key": 5335910560,
|
||||
"line": 18,
|
||||
"name": "Object#c",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 177000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/Users/mcorrea/src/github.com/dalehamel/speedscope/sample/programs/ruby/simple.rb",
|
||||
"key": 5335909880,
|
||||
"line": 32,
|
||||
"name": "Object#e",
|
||||
"selfWeight": 79000,
|
||||
"totalWeight": 79000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "",
|
||||
"key": 1,
|
||||
"line": undefined,
|
||||
"name": "(garbage collection)",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 79000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "",
|
||||
"key": 5,
|
||||
"line": undefined,
|
||||
"name": "(sweeping)",
|
||||
"selfWeight": 71000,
|
||||
"totalWeight": 71000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "",
|
||||
"key": 3,
|
||||
"line": undefined,
|
||||
"name": "(marking)",
|
||||
"selfWeight": 8000,
|
||||
"totalWeight": 8000,
|
||||
},
|
||||
],
|
||||
"name": "simple-cpu-stackprof.json",
|
||||
"stacks": Array [
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 3.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 5.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(marking) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 3.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 3.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 3.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 2.00ms",
|
||||
"(garbage collection);(marking) 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 2.00ms",
|
||||
"(garbage collection);(sweeping) 3.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"(garbage collection);(marking) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 3.00ms",
|
||||
"(garbage collection);(sweeping) 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 3.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 4.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 4.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 3.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 3.00ms",
|
||||
"(garbage collection);(marking) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 4.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 3.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 2.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 3.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 3.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 2.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 5.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(sweeping) 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 2.00ms",
|
||||
"(garbage collection);(sweeping) 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 2.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(marking) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 3.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"(garbage collection);(marking) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 4.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 4.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 3.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 4.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 3.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 3.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(sweeping) 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"(garbage collection);(sweeping) 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 3.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 3.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 3.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 3.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(marking) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 5.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 3.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 4.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 4.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(marking) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 5.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 1.00ms",
|
||||
"(garbage collection);(sweeping) 2.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 4.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#e 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 4.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 3.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 3.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#b;Object#b;Object#d;Object#d 2.00ms",
|
||||
"(garbage collection);(sweeping) 1.00ms",
|
||||
"<main>;<main>;block in <main>;Object#a;Object#a;Object#c;Object#c;Object#d;Object#d 3.00ms",
|
||||
],
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`importCpuProfileWithProperWeights importFromStackprof cpu mode snapshot: indexToView 1`] = `0`;
|
||||
|
||||
exports[`importCpuProfileWithProperWeights importFromStackprof cpu mode snapshot: profileGroup.name 1`] = `"simple-cpu-stackprof.json"`;
|
||||
|
||||
exports[`importFromStackprof 1`] = `
|
||||
Object {
|
||||
"frames": Array [
|
||||
@@ -1046,6 +1494,201 @@ exports[`importFromStackprof object mode: indexToView 1`] = `0`;
|
||||
|
||||
exports[`importFromStackprof object mode: profileGroup.name 1`] = `"object-stackprof.json"`;
|
||||
|
||||
exports[`importFromStackprof when a profile has a frame with no name 1`] = `
|
||||
Object {
|
||||
"frames": Array [
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "../../alexcoco/speedscope/sample/programs/ruby/object.rb",
|
||||
"key": 4317728280,
|
||||
"line": undefined,
|
||||
"name": "<main>",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 103,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/Users/alex/src/github.com/alexcoco/speedscope/sample/programs/ruby/object.rb",
|
||||
"key": 4376547240,
|
||||
"line": undefined,
|
||||
"name": "<main>",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 103,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "<cfunc>",
|
||||
"key": 4379035920,
|
||||
"line": null,
|
||||
"name": "StackProf.run",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 103,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/Users/alex/src/github.com/alexcoco/speedscope/sample/programs/ruby/object.rb",
|
||||
"key": 4317464320,
|
||||
"line": 21,
|
||||
"name": "block in <main>",
|
||||
"selfWeight": 1,
|
||||
"totalWeight": 103,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/Users/alex/src/github.com/alexcoco/speedscope/sample/programs/ruby/object.rb",
|
||||
"key": 4379033920,
|
||||
"line": 4,
|
||||
"name": "Object#a",
|
||||
"selfWeight": 2,
|
||||
"totalWeight": 102,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "<cfunc>",
|
||||
"key": 4317869400,
|
||||
"line": null,
|
||||
"name": "Range#each",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 102,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/Users/alex/src/github.com/alexcoco/speedscope/sample/programs/ruby/object.rb",
|
||||
"key": 4379033880,
|
||||
"line": 11,
|
||||
"name": "Object#b",
|
||||
"selfWeight": 1,
|
||||
"totalWeight": 5,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "<cfunc>",
|
||||
"key": 4318054440,
|
||||
"line": null,
|
||||
"name": "Class#new",
|
||||
"selfWeight": 4,
|
||||
"totalWeight": 4,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "/Users/alex/src/github.com/alexcoco/speedscope/sample/programs/ruby/object.rb",
|
||||
"key": 4379033840,
|
||||
"line": 15,
|
||||
"name": "Object#c",
|
||||
"selfWeight": 2,
|
||||
"totalWeight": 95,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "<cfunc>",
|
||||
"key": 4317868920,
|
||||
"line": null,
|
||||
"name": "Range#to_a",
|
||||
"selfWeight": 1,
|
||||
"totalWeight": 37,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "<cfunc>",
|
||||
"key": 4379016640,
|
||||
"line": null,
|
||||
"name": "Enumerable#to_a",
|
||||
"selfWeight": 36,
|
||||
"totalWeight": 36,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "<internal:array>",
|
||||
"key": 4317563560,
|
||||
"line": 60,
|
||||
"name": "Array#sample",
|
||||
"selfWeight": 20,
|
||||
"totalWeight": 20,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": "<cfunc>",
|
||||
"key": 4317922760,
|
||||
"line": null,
|
||||
"name": "(unknown)",
|
||||
"selfWeight": 36,
|
||||
"totalWeight": 36,
|
||||
},
|
||||
],
|
||||
"name": "stackprof-last-frame-no-name.json",
|
||||
"stacks": Array [
|
||||
"<main>;<main>;StackProf.run;block in <main> 1",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a 1",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#b 1",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#b;Class#new 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a 1",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c 1",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Range#to_a 1",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Range#to_a;Enumerable#to_a 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c 1",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Array#sample 3",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;(unknown) 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Range#to_a;Enumerable#to_a 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Array#sample 1",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;(unknown) 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Range#to_a;Enumerable#to_a 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Array#sample 1",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;(unknown) 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Range#to_a;Enumerable#to_a 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Array#sample 1",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;(unknown) 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Range#to_a;Enumerable#to_a 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Array#sample 1",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;(unknown) 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Range#to_a;Enumerable#to_a 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Array#sample 1",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;(unknown) 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#b;Class#new 1",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Range#to_a;Enumerable#to_a 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Array#sample 1",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;(unknown) 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Range#to_a;Enumerable#to_a 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Array#sample 1",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;(unknown) 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Range#to_a;Enumerable#to_a 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Array#sample 1",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;(unknown) 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Range#to_a;Enumerable#to_a 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Array#sample 1",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;(unknown) 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Range#to_a;Enumerable#to_a 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Array#sample 1",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;(unknown) 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Range#to_a;Enumerable#to_a 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Array#sample 1",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;(unknown) 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#b;Class#new 1",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Range#to_a;Enumerable#to_a 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Array#sample 1",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;(unknown) 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Range#to_a;Enumerable#to_a 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Array#sample 1",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;(unknown) 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Range#to_a;Enumerable#to_a 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Array#sample 1",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;(unknown) 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Range#to_a;Enumerable#to_a 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Array#sample 1",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;(unknown) 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Range#to_a;Enumerable#to_a 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Array#sample 1",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;(unknown) 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Range#to_a;Enumerable#to_a 2",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;Array#sample 1",
|
||||
"<main>;<main>;StackProf.run;block in <main>;Object#a;Range#each;Object#a;Object#c;Range#each;Object#c;(unknown) 2",
|
||||
],
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`importFromStackprof when a profile has a frame with no name: indexToView 1`] = `0`;
|
||||
|
||||
exports[`importFromStackprof when a profile has a frame with no name: profileGroup.name 1`] = `"stackprof-last-frame-no-name.json"`;
|
||||
|
||||
exports[`importFromStackprof: indexToView 1`] = `0`;
|
||||
|
||||
exports[`importFromStackprof: profileGroup.name 1`] = `"simple-stackprof.json"`;
|
||||
|
||||
@@ -11,3 +11,11 @@ test('importFromCallgrind name compression', async () => {
|
||||
test('importFromCallgrind multiple event types', async () => {
|
||||
await checkProfileSnapshot('./sample/profiles/callgrind/callgrind.multiple-event-types.log')
|
||||
})
|
||||
|
||||
test('importFromCallgrind subposition compression', async () => {
|
||||
await checkProfileSnapshot('./sample/profiles/callgrind/callgrind.subposition-compression.log')
|
||||
})
|
||||
|
||||
test('importFromCallgrind cfn reset', async () => {
|
||||
await checkProfileSnapshot('./sample/profiles/callgrind/callgrind.cfn-reset.log')
|
||||
})
|
||||
|
||||
+168
-55
@@ -129,26 +129,6 @@ class CallGraph {
|
||||
}
|
||||
|
||||
toProfile(): Profile {
|
||||
// To convert a call graph into a profile, we first need to identify what
|
||||
// the "root weights" are. "root weights" are the total weight of each frame
|
||||
// while at the bottom of the call-stack. The majority of functions will have
|
||||
// zero weight while at the bottom of the call-stack, since most functions
|
||||
// are never at the bottom of the call-stack.
|
||||
const rootWeights = new Map<Frame, number>()
|
||||
for (let [frame, totalWeight] of this.totalWeights) {
|
||||
rootWeights.set(frame, totalWeight)
|
||||
}
|
||||
for (let [_, childMap] of this.childrenTotalWeights) {
|
||||
for (let [child, weight] of childMap) {
|
||||
rootWeights.set(child, getOrElse(rootWeights, child, () => weight) - weight)
|
||||
}
|
||||
}
|
||||
|
||||
let totalProfileWeight = 0
|
||||
for (let [_, rootWeight] of rootWeights) {
|
||||
totalProfileWeight += rootWeight
|
||||
}
|
||||
|
||||
const profile = new CallTreeProfileBuilder()
|
||||
|
||||
let unitMultiplier = 1
|
||||
@@ -170,7 +150,12 @@ class CallGraph {
|
||||
|
||||
const currentStack = new Set<Frame>()
|
||||
|
||||
const visit = (frame: Frame, callTreeWeight: number) => {
|
||||
let maxWeight = 0
|
||||
for (let [_, totalWeight] of this.totalWeights) {
|
||||
maxWeight = Math.max(maxWeight, totalWeight)
|
||||
}
|
||||
|
||||
const visit = (frame: Frame, subtreeTotalWeight: number) => {
|
||||
if (currentStack.has(frame)) {
|
||||
// Call-graphs are allowed to have cycles. Call-trees are not. In case
|
||||
// we run into a cycle, we'll just avoid recursing into the same subtree
|
||||
@@ -198,7 +183,7 @@ class CallGraph {
|
||||
// See the comment at the top of the file for an example where this
|
||||
// assumption can yield especially misleading results.
|
||||
|
||||
if (callTreeWeight < 1e-4 * totalProfileWeight) {
|
||||
if (subtreeTotalWeight < 1e-4 * maxWeight) {
|
||||
// This assumption about even distribution can cause us to generate a
|
||||
// call tree with dramatically more nodes than the call graph.
|
||||
//
|
||||
@@ -220,45 +205,113 @@ class CallGraph {
|
||||
// 1000*250=250,000 nodes in the resulting call graph.
|
||||
//
|
||||
// To mitigate this explosion of the # of nodes, we ignore subtrees
|
||||
// whose weights are less than 0.01% of the total weight of the profile.
|
||||
// whose weights are less than 0.01% of the heaviest node in the call
|
||||
// graph.
|
||||
return
|
||||
}
|
||||
|
||||
// totalWeightForFrame is the total weight for the given frame in the
|
||||
// entire call graph.
|
||||
const callGraphWeightForFrame = getOrElse(this.totalWeights, frame, () => 0)
|
||||
if (callGraphWeightForFrame === 0) {
|
||||
const totalWeightForFrameInCallgraph = getOrElse(this.totalWeights, frame, () => 0)
|
||||
if (totalWeightForFrameInCallgraph === 0) {
|
||||
return
|
||||
}
|
||||
|
||||
// This is the portion of the total time the given child spends within the
|
||||
// given parent that we'll attribute to this specific path in the call
|
||||
// tree.
|
||||
const ratio = callTreeWeight / callGraphWeightForFrame
|
||||
let selfWeightForNodeInCallTree = subtreeTotalWeight
|
||||
|
||||
let selfWeightForFrame = callGraphWeightForFrame
|
||||
|
||||
profile.enterFrame(frame, totalCumulative * unitMultiplier)
|
||||
profile.enterFrame(frame, Math.round(totalCumulative * unitMultiplier))
|
||||
|
||||
currentStack.add(frame)
|
||||
for (let [child, callGraphEdgeWeight] of this.childrenTotalWeights.get(frame) || []) {
|
||||
selfWeightForFrame -= callGraphEdgeWeight
|
||||
const childCallTreeWeight = callGraphEdgeWeight * ratio
|
||||
for (let [child, totalWeightAsChild] of this.childrenTotalWeights.get(frame) || []) {
|
||||
// To determine the weight of the child in the call tree, we look at the
|
||||
// weight of the child in the call graph relative to its parent.
|
||||
const childCallTreeWeight =
|
||||
subtreeTotalWeight * (totalWeightAsChild / totalWeightForFrameInCallgraph)
|
||||
|
||||
let prevTotalCumulative = totalCumulative
|
||||
visit(child, childCallTreeWeight)
|
||||
|
||||
// Even though we tried to add a child with total weight equal to
|
||||
// childCallTreeWeight, we might have failed for a variety of data
|
||||
// consistency reasons, or due to cycles.
|
||||
//
|
||||
// We want to avoid losing weight in the call tree by subtracting from
|
||||
// the self weight on the assumption it was added to the subtree, so we
|
||||
// only subtree from the self weight the amount that was *actually* used
|
||||
// by the subtree, rather than the amount we *intended* for it to use.
|
||||
const actualChildCallTreeWeight = totalCumulative - prevTotalCumulative
|
||||
selfWeightForNodeInCallTree -= actualChildCallTreeWeight
|
||||
}
|
||||
currentStack.delete(frame)
|
||||
|
||||
totalCumulative += selfWeightForFrame * ratio
|
||||
profile.leaveFrame(frame, totalCumulative * unitMultiplier)
|
||||
totalCumulative += selfWeightForNodeInCallTree
|
||||
profile.leaveFrame(frame, Math.round(totalCumulative * unitMultiplier))
|
||||
}
|
||||
|
||||
for (let [rootFrame, rootWeight] of rootWeights) {
|
||||
if (rootWeight <= 0) {
|
||||
continue
|
||||
// It's surprisingly hard to figure out which nodes in the call graph
|
||||
// constitute the root nodes of call trees.
|
||||
//
|
||||
// Here are a few intuitive options, and reasons why they're not always
|
||||
// correct or good.
|
||||
//
|
||||
// ## 1. Find nodes in the call graph that have no callers
|
||||
//
|
||||
// This is probably right 99% of the time in practice, but since the
|
||||
// callgrind is totally general, it's totally valid to have a file
|
||||
// representing a profile for the following code:
|
||||
//
|
||||
// function a() {
|
||||
// b()
|
||||
// }
|
||||
// function b() {
|
||||
// }
|
||||
// a()
|
||||
// b()
|
||||
//
|
||||
// In this case, even though b has a caller, some of the real calltree for
|
||||
// an execution trace of the program will have b on the top of the stack.
|
||||
//
|
||||
// ## 2. Find nodes in the call graph that still have weight if you
|
||||
// subtract all of the weight caused by callers.
|
||||
//
|
||||
// The callgraph format, in theory, provides inclusive times for every
|
||||
// function call. That means if you have a function `alpha` with a total
|
||||
// weight of 20, and its only in-edge in the call-graph has weight of 10,
|
||||
// that should indicate that `alpha` exists both as the root-node of a
|
||||
// calltree, and as a node in some other call-tree.
|
||||
//
|
||||
// In theory, you should be able to figure out the weight of it as a root
|
||||
// node by subtracting the weights of all the in-edges. In practice, real
|
||||
// callgrind files are inconsistent in how they do accounting for in-edges
|
||||
// where you end up in weird situations where the weight of in-edges
|
||||
// *exceeds* the weight of nodes (where the weight of a node is its
|
||||
// self-weight plus the weight of all its out-edges).
|
||||
//
|
||||
// ## 3. Find the heaviest node in the call graph, build its call-tree, and
|
||||
// decrease the weights of other nodes in the call graph while you
|
||||
// build the call tree. After you've done this, repeat with the new
|
||||
// heaviest.
|
||||
//
|
||||
// I think this version is probably fully correct, but the performance is
|
||||
// awful. The naive-version is O(n^2) because you have to re-determine which
|
||||
// node is the heaviest after each time you finish building a call-tree. You
|
||||
// can't just sort, because the relative ordering also changes with the
|
||||
// construction of each call tree.
|
||||
//
|
||||
// There's probably a clever solution here which puts all of the nodes into
|
||||
// a min-heap and then deletes and re-inserts nodes as their weights change,
|
||||
// but reasoning about the performance of that is a big pain in the butt.
|
||||
//
|
||||
// Despite not always being correct, I'm opting for option (1).
|
||||
|
||||
const rootNodes = new Set<Frame>(this.frameSet)
|
||||
|
||||
for (let [_, childMap] of this.childrenTotalWeights) {
|
||||
for (let [child, _] of childMap) {
|
||||
rootNodes.delete(child)
|
||||
}
|
||||
// If we've reached here, it means that the given root frame has some
|
||||
// weight while at the top of the call-stack.
|
||||
visit(rootFrame, rootWeight)
|
||||
}
|
||||
|
||||
for (let rootNode of rootNodes) {
|
||||
visit(rootNode, this.totalWeights.get(rootNode)!)
|
||||
}
|
||||
|
||||
return profile.build()
|
||||
@@ -344,7 +397,7 @@ class CallgrindParser {
|
||||
}
|
||||
|
||||
private calleeFrameInfo(): FrameInfo {
|
||||
const file = this.calleeFilename || '(unknown)'
|
||||
const file = this.calleeFilename || this.filename || '(unknown)'
|
||||
const name = this.calleeFunctionName || '(unknown)'
|
||||
const key = `${file}:${name}`
|
||||
return {key, name, file}
|
||||
@@ -384,10 +437,20 @@ class CallgrindParser {
|
||||
|
||||
switch (key) {
|
||||
case 'fe':
|
||||
case 'fi':
|
||||
case 'fi': {
|
||||
// fe/fi are used to indicate the source-file of a function definition
|
||||
// changed mid-definition. This is for inlined code, but doesn't
|
||||
// indicate that we've actually switched to referring to a different
|
||||
// function, so we mostly ignore it.
|
||||
//
|
||||
// We still need to do the parseNameWithCompression call in case a name
|
||||
// is defined and then referenced later on for name compression.
|
||||
this.parseNameWithCompression(value, this.savedFileNames)
|
||||
break
|
||||
}
|
||||
|
||||
case 'fl': {
|
||||
this.filename = this.parseNameWithCompression(value, this.savedFileNames)
|
||||
this.calleeFilename = this.filename
|
||||
break
|
||||
}
|
||||
|
||||
@@ -398,6 +461,8 @@ class CallgrindParser {
|
||||
|
||||
case 'cfi':
|
||||
case 'cfl': {
|
||||
// NOTE: unlike the fe/fi distinction described above, cfi and cfl are
|
||||
// interchangeable.
|
||||
this.calleeFilename = this.parseNameWithCompression(value, this.savedFileNames)
|
||||
break
|
||||
}
|
||||
@@ -413,6 +478,22 @@ class CallgrindParser {
|
||||
// since it'll just be copying the exact same frame over-and-over again,
|
||||
// but that might be better than ignoring it.
|
||||
this.parseCostLine(this.lines[this.lineNum++], 'child')
|
||||
|
||||
// This isn't specified anywhere in the spec, but empirically the and
|
||||
// "cfn" scope should only persist for a single "call".
|
||||
//
|
||||
// This seems to be what KCacheGrind does too:
|
||||
//
|
||||
// https://github.com/KDE/kcachegrind/blob/ea4314db2785cb8f279fe884ee7f82445642b692/libcore/cachegrindloader.cpp#L1259
|
||||
this.calleeFilename = null
|
||||
this.calleeFunctionName = null
|
||||
break
|
||||
}
|
||||
|
||||
case 'cob':
|
||||
case 'ob': {
|
||||
// We ignore these for now. They're valid lines, but we don't capture or
|
||||
// display information about them.
|
||||
break
|
||||
}
|
||||
|
||||
@@ -458,21 +539,52 @@ class CallgrindParser {
|
||||
return name
|
||||
}
|
||||
|
||||
private prevCostLineNumbers: number[] = []
|
||||
|
||||
private parseCostLine(line: string, costType: 'self' | 'child'): boolean {
|
||||
// TODO(jlfwong): Handle "Subposition compression"
|
||||
// TODO(jlfwong): Allow hexadecimal encoding
|
||||
|
||||
const parts = line.split(/\s+/)
|
||||
const nums: number[] = []
|
||||
for (let part of parts) {
|
||||
// As far as I can tell from the specification, the callgrind format does
|
||||
// not accept floating point numbers.
|
||||
const asNum = parseInt(part)
|
||||
if (isNaN(asNum)) {
|
||||
|
||||
for (let i = 0; i < parts.length; i++) {
|
||||
const part = parts[i]
|
||||
|
||||
if (part.length === 0) {
|
||||
return false
|
||||
}
|
||||
|
||||
nums.push(asNum)
|
||||
if (part === '*' || part[0] === '-' || part[1] === '+') {
|
||||
// This handles "Subposition compression"
|
||||
// See: https://valgrind.org/docs/manual/cl-format.html#cl-format.overview.compression2
|
||||
if (this.prevCostLineNumbers.length <= i) {
|
||||
throw new Error(
|
||||
`Line ${this.lineNum} has a subposition on column ${i} but ` +
|
||||
`previous cost line has only ${this.prevCostLineNumbers.length} ` +
|
||||
`columns. Line contents: ${line}`,
|
||||
)
|
||||
}
|
||||
const prevCostForSubposition = this.prevCostLineNumbers[i]
|
||||
if (part === '*') {
|
||||
nums.push(prevCostForSubposition)
|
||||
} else {
|
||||
// This handles both the '-' and '+' cases
|
||||
const offset = parseInt(part)
|
||||
if (isNaN(offset)) {
|
||||
throw new Error(
|
||||
`Line ${this.lineNum} has a subposition on column ${i} but ` +
|
||||
`the offset is not a number. Line contents: ${line}`,
|
||||
)
|
||||
}
|
||||
nums.push(prevCostForSubposition + offset)
|
||||
}
|
||||
} else {
|
||||
const asNum = parseInt(part)
|
||||
if (isNaN(asNum)) {
|
||||
return false
|
||||
}
|
||||
nums.push(asNum)
|
||||
}
|
||||
}
|
||||
|
||||
if (nums.length == 0) {
|
||||
@@ -506,6 +618,7 @@ class CallgrindParser {
|
||||
}
|
||||
}
|
||||
|
||||
this.prevCostLineNumbers = nums
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,3 +30,7 @@ test('importFromChromeTimeline Workers Chrome 66', async () => {
|
||||
test('importFromChromeTimeline Workers Chrome 70', async () => {
|
||||
await checkProfileSnapshot('./sample/profiles/Chrome/70/worker.json')
|
||||
})
|
||||
|
||||
test('importFromChromeTimeline Chrome 116', async () => {
|
||||
await checkProfileSnapshot('./sample/profiles/Chrome/116/Trace-20230603T221323.json')
|
||||
})
|
||||
|
||||
@@ -49,7 +49,7 @@ export interface CPUProfile {
|
||||
timeDeltas: number[]
|
||||
}
|
||||
|
||||
export function isChromeTimeline(rawProfile: any): boolean {
|
||||
export function isChromeTimeline(rawProfile: any): rawProfile is TimelineEvent[] {
|
||||
if (!Array.isArray(rawProfile)) return false
|
||||
if (rawProfile.length < 1) return false
|
||||
const first = rawProfile[0]
|
||||
@@ -63,6 +63,14 @@ export function isChromeTimeline(rawProfile: any): boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
export function isChromeTimelineObject(
|
||||
rawProfile: any,
|
||||
): rawProfile is {traceEvents: TimelineEvent[]} {
|
||||
// Starting with Chrome 114, the timeline format output by devtools is an object
|
||||
if (!('traceEvents' in rawProfile)) return false
|
||||
return isChromeTimeline(rawProfile.traceEvents)
|
||||
}
|
||||
|
||||
export function importFromChromeTimeline(events: TimelineEvent[], fileName: string): ProfileGroup {
|
||||
// It seems like sometimes Chrome timeline files contain multiple CpuProfiles?
|
||||
// For now, choose the first one in the list.
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
importFromChromeTimeline,
|
||||
isChromeTimeline,
|
||||
importFromOldV8CPUProfile,
|
||||
isChromeTimelineObject,
|
||||
} from './chrome'
|
||||
import {importFromStackprof} from './stackprof'
|
||||
import {importFromInstrumentsDeepCopy, importFromInstrumentsTrace} from './instruments'
|
||||
@@ -92,6 +93,9 @@ async function _importProfileGroup(dataSource: ProfileDataSource): Promise<Profi
|
||||
if (fileName.endsWith('.speedscope.json')) {
|
||||
console.log('Importing as speedscope json file')
|
||||
return importSpeedscopeProfiles(contents.parseAsJSON())
|
||||
} else if (/Trace-\d{8}T\d{6}/.exec(fileName)) {
|
||||
console.log('Importing as Chrome Timeline Object')
|
||||
return importFromChromeTimeline(contents.parseAsJSON().traceEvents, fileName)
|
||||
} else if (fileName.endsWith('.chrome.json') || /Profile-\d{8}T\d{6}/.exec(fileName)) {
|
||||
console.log('Importing as Chrome Timeline')
|
||||
return importFromChromeTimeline(contents.parseAsJSON(), fileName)
|
||||
@@ -136,6 +140,9 @@ async function _importProfileGroup(dataSource: ProfileDataSource): Promise<Profi
|
||||
} else if (isChromeTimeline(parsed)) {
|
||||
console.log('Importing as Chrome Timeline')
|
||||
return importFromChromeTimeline(parsed, fileName)
|
||||
} else if (isChromeTimelineObject(parsed)) {
|
||||
console.log('Importing as Chrome Timeline Object')
|
||||
return importFromChromeTimeline(parsed.traceEvents, fileName)
|
||||
} else if ('nodes' in parsed && 'samples' in parsed && 'timeDeltas' in parsed) {
|
||||
console.log('Importing as Chrome CPU Profile')
|
||||
return toGroup(importFromChromeCPUProfile(parsed))
|
||||
|
||||
@@ -18,6 +18,10 @@ describe('importFromInstrumentsDeepCopy', () => {
|
||||
'./sample/profiles/Instruments/7.3.1/random-allocations-deep-copy.txt',
|
||||
)
|
||||
})
|
||||
|
||||
test('allocations profile', async () => {
|
||||
await checkProfileSnapshot('./sample/profiles/Instruments/13.4/cycles-example-deep-copy.txt')
|
||||
})
|
||||
})
|
||||
|
||||
class ZipBackedFileSystemEntry implements FileSystemEntry {
|
||||
|
||||
@@ -85,7 +85,16 @@ function getWeight(deepCopyRow: any): number {
|
||||
case 's':
|
||||
return 1000 * value
|
||||
case 'min':
|
||||
return 60 * 1000 * value
|
||||
|
||||
case 'cycles':
|
||||
return value
|
||||
case 'Kc':
|
||||
return 1000 * value
|
||||
case 'Mc':
|
||||
return 1000 * 1000 * value
|
||||
case 'Gc':
|
||||
return 1000 * 1000 * 1000 * value
|
||||
}
|
||||
throw new Error(`Unrecognized units ${units}`)
|
||||
}
|
||||
|
||||
+27
-4
@@ -2,12 +2,32 @@ import {perftools} from './profile.proto.js'
|
||||
import {FrameInfo, StackListProfileBuilder, Profile} from '../lib/profile'
|
||||
import {lastOf} from '../lib/utils'
|
||||
import {TimeFormatter, ByteFormatter} from '../lib/value-formatters'
|
||||
import Long from 'long'
|
||||
|
||||
interface SampleType {
|
||||
type: string
|
||||
unit: string
|
||||
}
|
||||
|
||||
// Find the index of the SampleType which should be used as our default
|
||||
function getSampleTypeIndex(profile: perftools.profiles.Profile): number {
|
||||
const dflt = profile.defaultSampleType
|
||||
const sampleTypes = profile.sampleType
|
||||
const fallback = sampleTypes.length - 1
|
||||
|
||||
// string_table[0] will always be empty-string, so we can assume dflt === 0 is just the proto
|
||||
// empty-value, and means no defaultSampleType was specified.
|
||||
if (!dflt || !+dflt) {
|
||||
return fallback
|
||||
}
|
||||
|
||||
const idx = sampleTypes.findIndex(e => e.type === dflt)
|
||||
if (idx === -1) {
|
||||
return fallback
|
||||
}
|
||||
return idx
|
||||
}
|
||||
|
||||
export function importAsPprofProfile(rawProfile: ArrayBuffer): Profile | null {
|
||||
if (rawProfile.byteLength === 0) return null
|
||||
|
||||
@@ -81,7 +101,12 @@ export function importAsPprofProfile(rawProfile: ArrayBuffer): Profile | null {
|
||||
if (lastLine == null) return null
|
||||
|
||||
if (lastLine.functionId) {
|
||||
return frameInfoByFunctionID.get(i32(lastLine.functionId)) || null
|
||||
let funcFrame = frameInfoByFunctionID.get(i32(lastLine.functionId))
|
||||
const line = lastLine.line instanceof Long ? lastLine.line.toNumber() : lastLine.line
|
||||
if (line && line > 0 && funcFrame != null) {
|
||||
funcFrame.line = line
|
||||
}
|
||||
return funcFrame || null
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
@@ -103,9 +128,7 @@ export function importAsPprofProfile(rawProfile: ArrayBuffer): Profile | null {
|
||||
unit: (type.unit && stringVal(type.unit)) || 'count',
|
||||
}))
|
||||
|
||||
const sampleTypeIndex = protoProfile.defaultSampleType
|
||||
? +protoProfile.defaultSampleType
|
||||
: sampleTypes.length - 1
|
||||
const sampleTypeIndex = getSampleTypeIndex(protoProfile)
|
||||
const sampleType = sampleTypes[sampleTypeIndex]
|
||||
|
||||
const profileBuilder = new StackListProfileBuilder()
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { readFileSync } from 'fs';
|
||||
import { importProfileGroupFromText } from '.'
|
||||
import {checkProfileSnapshot} from '../lib/test-utils'
|
||||
|
||||
test('importFromStackprof', async () => {
|
||||
@@ -7,3 +9,30 @@ test('importFromStackprof', async () => {
|
||||
test('importFromStackprof object mode', async () => {
|
||||
await checkProfileSnapshot('./sample/profiles/stackprof/object-stackprof.json')
|
||||
})
|
||||
|
||||
test('importFromStackprof when a profile has a frame with no name', async () => {
|
||||
await checkProfileSnapshot('./sample/profiles/stackprof/stackprof-last-frame-no-name.json')
|
||||
})
|
||||
|
||||
describe('importCpuProfileWithProperWeights', () => {
|
||||
test('importFromStackprof cpu mode snapshot', async () => {
|
||||
await checkProfileSnapshot('./sample/profiles/stackprof/simple-cpu-stackprof.json')
|
||||
})
|
||||
|
||||
test('uses samples count for weight when importing cpu profile', async () => {
|
||||
|
||||
const profileFile = readFileSync('./sample/profiles/stackprof/simple-cpu-stackprof.json')
|
||||
const profileGroup = await importProfileGroupFromText('simple-cpu-stackprof.json', profileFile.toString())
|
||||
expect(profileGroup).not.toBeNull()
|
||||
|
||||
if (profileGroup) {
|
||||
const profile = profileGroup.profiles[profileGroup.indexToView]
|
||||
expect(profile).not.toBeNull()
|
||||
|
||||
if (profile) {
|
||||
expect(profile.getWeightUnit()).toBe('microseconds')
|
||||
expect(profile.getTotalWeight()).toBe(489000)
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
+28
-22
@@ -1,10 +1,10 @@
|
||||
// https://github.com/tmm1/stackprof
|
||||
|
||||
import {Profile, FrameInfo, StackListProfileBuilder} from '../lib/profile'
|
||||
import {TimeFormatter} from '../lib/value-formatters'
|
||||
import {RawValueFormatter, TimeFormatter} from '../lib/value-formatters'
|
||||
|
||||
interface StackprofFrame {
|
||||
name: string
|
||||
name?: string
|
||||
file?: string
|
||||
line?: number
|
||||
}
|
||||
@@ -15,14 +15,13 @@ export interface StackprofProfile {
|
||||
raw: number[]
|
||||
raw_timestamp_deltas: number[]
|
||||
samples: number
|
||||
interval: number
|
||||
}
|
||||
|
||||
export function importFromStackprof(stackprofProfile: StackprofProfile): Profile {
|
||||
const {frames, mode, raw, raw_timestamp_deltas, samples} = stackprofProfile
|
||||
const objectMode = mode == 'object'
|
||||
|
||||
const size = objectMode ? samples : stackprofProfile.raw_timestamp_deltas.reduce((a, b) => a + b, 0)
|
||||
const profile = new StackListProfileBuilder(size)
|
||||
const {frames, mode, raw, raw_timestamp_deltas, interval} = stackprofProfile
|
||||
const profile = new StackListProfileBuilder()
|
||||
profile.setValueFormatter(new TimeFormatter('microseconds')) // default to time format unless we're in object mode
|
||||
|
||||
let sampleIndex = 0
|
||||
|
||||
@@ -34,33 +33,40 @@ export function importFromStackprof(stackprofProfile: StackprofProfile): Profile
|
||||
let stack: FrameInfo[] = []
|
||||
for (let j = 0; j < stackHeight; j++) {
|
||||
const id = raw[i++]
|
||||
stack.push({
|
||||
let frameName = frames[id].name;
|
||||
if (frameName == null) {
|
||||
frameName = '(unknown)';
|
||||
}
|
||||
const frame = {
|
||||
key: id,
|
||||
...frames[id],
|
||||
})
|
||||
name: frameName,
|
||||
}
|
||||
stack.push(frame)
|
||||
}
|
||||
if (stack.length === 1 && stack[0].name === '(garbage collection)') {
|
||||
stack = prevStack.concat(stack)
|
||||
}
|
||||
const nSamples = raw[i++]
|
||||
|
||||
if (objectMode) {
|
||||
profile.appendSampleWithWeight(stack, nSamples)
|
||||
} else {
|
||||
let sampleDuration = 0
|
||||
for (let j = 0; j < nSamples; j++) {
|
||||
sampleDuration += raw_timestamp_deltas[sampleIndex++]
|
||||
}
|
||||
|
||||
profile.appendSampleWithWeight(stack, sampleDuration)
|
||||
switch (mode) {
|
||||
case 'object':
|
||||
profile.appendSampleWithWeight(stack, nSamples)
|
||||
profile.setValueFormatter(new RawValueFormatter())
|
||||
break
|
||||
case 'cpu':
|
||||
profile.appendSampleWithWeight(stack, nSamples * interval)
|
||||
break
|
||||
default:
|
||||
let sampleDuration = 0
|
||||
for (let j = 0; j < nSamples; j++) {
|
||||
sampleDuration += raw_timestamp_deltas[sampleIndex++]
|
||||
}
|
||||
profile.appendSampleWithWeight(stack, sampleDuration)
|
||||
}
|
||||
|
||||
prevStack = stack
|
||||
}
|
||||
|
||||
if (!objectMode) {
|
||||
profile.setValueFormatter(new TimeFormatter('microseconds'))
|
||||
}
|
||||
|
||||
return profile.build()
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
import {exactMatchStrings} from './profile-search'
|
||||
|
||||
function assertMatch(text: string, pattern: string, expected: string) {
|
||||
const match = exactMatchStrings(text, pattern)
|
||||
|
||||
let highlighted = ''
|
||||
let last = 0
|
||||
for (let range of match) {
|
||||
highlighted += `${text.slice(last, range[0])}[${text.slice(range[0], range[1])}]`
|
||||
last = range[1]
|
||||
}
|
||||
highlighted += text.slice(last)
|
||||
|
||||
expect(highlighted).toEqual(expected)
|
||||
}
|
||||
|
||||
function assertNoMatch(text: string, pattern: string) {
|
||||
assertMatch(text, pattern, text)
|
||||
}
|
||||
|
||||
describe('exactMatchStrings', () => {
|
||||
test('no match', () => {
|
||||
assertNoMatch('a', 'b')
|
||||
assertNoMatch('aa', 'ab')
|
||||
assertNoMatch('a', 'aa')
|
||||
assertNoMatch('ca', 'ac')
|
||||
})
|
||||
|
||||
test('full text match', () => {
|
||||
assertMatch('hello', 'hello', '[hello]')
|
||||
assertMatch('multiple words', 'multiple words', '[multiple words]')
|
||||
})
|
||||
|
||||
test('case sensitivity', () => {
|
||||
assertMatch('HELLO', 'hello', '[HELLO]')
|
||||
assertMatch('Hello', 'hello', '[Hello]')
|
||||
assertMatch('hello', 'Hello', '[hello]')
|
||||
assertMatch('hello', 'HELLO', '[hello]')
|
||||
})
|
||||
|
||||
test('multiple occurrences', () => {
|
||||
assertMatch('hello hello', 'hello', '[hello] [hello]')
|
||||
assertMatch('hellohello', 'hello', '[hello][hello]')
|
||||
})
|
||||
|
||||
test('overlapping occurrences', () => {
|
||||
assertMatch('aaaaa', 'aa', '[aa][aa]a')
|
||||
assertMatch('abababa', 'aba', '[aba]b[aba]')
|
||||
})
|
||||
})
|
||||
@@ -1,5 +1,4 @@
|
||||
import {Profile, Frame, CallTreeNode} from './profile'
|
||||
import {FuzzyMatch, fuzzyMatchStrings} from './fuzzy-find'
|
||||
import {Flamechart, FlamechartFrame} from './flamechart'
|
||||
import {Rect, Vec2} from './math'
|
||||
|
||||
@@ -8,19 +7,47 @@ export enum FlamechartType {
|
||||
LEFT_HEAVY_FLAME_GRAPH,
|
||||
}
|
||||
|
||||
// In previous versions of speedscope, searching for strings within the profile
|
||||
// was done using fuzzy finding. As it turns out, this was surprising behavior
|
||||
// to most people, so we've switched to a more traditional substring search that
|
||||
// more closely mimics browser behavior.
|
||||
//
|
||||
// This is case insensitive for both the needle & the haystack. This means
|
||||
// searching for "hello" will match "Hello" and "HELLO", and searching for
|
||||
// "HELLO" will match both "hello" and "Hello". This matches Chrome's behavior
|
||||
// as far as I can tell.
|
||||
//
|
||||
// See https://github.com/jlfwong/speedscope/issues/352
|
||||
//
|
||||
// Return ranges for all matches in order to highlight them.
|
||||
export function exactMatchStrings(text: string, pattern: string): [number, number][] {
|
||||
const lowerText = text.toLocaleLowerCase()
|
||||
const lowerPattern = pattern.toLocaleLowerCase()
|
||||
|
||||
let lastIndex = 0
|
||||
const matchedRanges: Array<[number, number]> = []
|
||||
while (true) {
|
||||
let index = lowerText.indexOf(lowerPattern, lastIndex)
|
||||
if (index === -1) {
|
||||
return matchedRanges
|
||||
}
|
||||
matchedRanges.push([index, index + pattern.length])
|
||||
lastIndex = index + pattern.length
|
||||
}
|
||||
}
|
||||
|
||||
// A utility class for storing cached search results to avoid recomputation when
|
||||
// the search results & profile did not change.
|
||||
export class ProfileSearchResults {
|
||||
constructor(readonly profile: Profile, readonly searchQuery: string) {}
|
||||
|
||||
private matches: Map<Frame, FuzzyMatch> | null = null
|
||||
getMatchForFrame(frame: Frame): FuzzyMatch | null {
|
||||
private matches: Map<Frame, [number, number][] | null> | null = null
|
||||
getMatchForFrame(frame: Frame): [number, number][] | null {
|
||||
if (!this.matches) {
|
||||
this.matches = new Map()
|
||||
this.profile.forEachFrame(frame => {
|
||||
const match = fuzzyMatchStrings(frame.name, this.searchQuery)
|
||||
if (match == null) return
|
||||
this.matches!.set(frame, match)
|
||||
const match = exactMatchStrings(frame.name, this.searchQuery)
|
||||
this.matches!.set(frame, match.length === 0 ? null : match)
|
||||
})
|
||||
}
|
||||
return this.matches.get(frame) || null
|
||||
|
||||
@@ -241,7 +241,7 @@ export class FlamechartPanZoomView extends Component<FlamechartPanZoomViewProps,
|
||||
if (match) {
|
||||
const rangesToHighlightInTrimmedText = remapRangesToTrimmedText(
|
||||
trimmedText,
|
||||
match.matchedRanges,
|
||||
match
|
||||
)
|
||||
|
||||
// Once we have the character ranges to highlight, we need to
|
||||
|
||||
@@ -217,7 +217,7 @@ export const ProfileTableView = memo(
|
||||
rows.push(
|
||||
ProfileTableRowView({
|
||||
frame,
|
||||
matchedRanges: match == null ? null : match.matchedRanges,
|
||||
matchedRanges: match == null ? null : match,
|
||||
index: i,
|
||||
profile: profile,
|
||||
selectedFrame: selectedFrame,
|
||||
|
||||
@@ -11,7 +11,6 @@ import {SandwichSearchView} from './sandwich-search-view'
|
||||
import {ActiveProfileState} from '../app-state/active-profile-state'
|
||||
import {sortBy} from '../lib/utils'
|
||||
import {ProfileSearchContext} from './search-view'
|
||||
import {FuzzyMatch} from '../lib/fuzzy-find'
|
||||
import {Theme, useTheme, withTheme} from './themes/theme'
|
||||
import {SortField, SortDirection, profileGroupAtom, tableSortMethodAtom} from '../app-state'
|
||||
import {useAtom} from '../lib/atom'
|
||||
@@ -141,7 +140,7 @@ interface SandwichViewContextData {
|
||||
selectedFrame: Frame | null
|
||||
setSelectedFrame: (frame: Frame | null) => void
|
||||
getIndexForFrame: (frame: Frame) => number | null
|
||||
getSearchMatchForFrame: (frame: Frame) => FuzzyMatch | null
|
||||
getSearchMatchForFrame: (frame: Frame) => [number, number][] | null
|
||||
}
|
||||
|
||||
export const SandwichViewContext = createContext<SandwichViewContextData | null>(null)
|
||||
@@ -204,7 +203,7 @@ export const SandwichViewContainer = memo((ownProps: SandwichViewContainerProps)
|
||||
}
|
||||
}, [rowList])
|
||||
|
||||
const getSearchMatchForFrame: (frame: Frame) => FuzzyMatch | null = useMemo(() => {
|
||||
const getSearchMatchForFrame: (frame: Frame) => [number, number][] | null = useMemo(() => {
|
||||
return (frame: Frame) => {
|
||||
if (profileSearchResults == null) return null
|
||||
return profileSearchResults.getMatchForFrame(frame)
|
||||
|
||||
Reference in New Issue
Block a user