This should help keep things organized as speedscope supports more languages & more formats Test Plan: Try importing from every single file type, see that the link to load the example profile still works
33 lines
375 B
JavaScript
33 lines
375 B
JavaScript
function a() {
|
|
for (let i = 0; i < 1000; i++) {
|
|
b()
|
|
c()
|
|
}
|
|
}
|
|
|
|
function b() {
|
|
for (let i = 0; i < 10; i++) {
|
|
d()
|
|
}
|
|
}
|
|
|
|
function c() {
|
|
for (let i = 0; i < 10; i++) {
|
|
d()
|
|
}
|
|
}
|
|
|
|
function d() {
|
|
let prod = 1
|
|
for (let i = 1; i < 1000; i++) {
|
|
prod *= i
|
|
}
|
|
return prod
|
|
}
|
|
|
|
console.profile('a')
|
|
a()
|
|
setTimeout(() => {
|
|
console.profileEnd('a')
|
|
}, 0)
|