Reorganize sample directory (#34)
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
This commit is contained in:
+2
-2
@@ -17,7 +17,7 @@ import {importFromFirefox} from './import/firefox'
|
||||
import {importFromInstrumentsDeepCopy} from './import/instruments'
|
||||
|
||||
declare function require(x: string): any
|
||||
const exampleProfileURL = require('./sample/perf-vertx-stacks-01-collapsed-all.txt')
|
||||
const exampleProfileURL = require('./sample/profiles/stackcollapse/perf-vertx-stacks-01-collapsed-all.txt')
|
||||
|
||||
const enum SortOrder {
|
||||
CHRONO,
|
||||
@@ -88,7 +88,7 @@ function importProfile(contents: string, fileName: string): Profile | null {
|
||||
// If every line ends with a space followed by a number, it's probably
|
||||
// the collapsed stack format.
|
||||
const lineCount = contents.split(/\n/).length
|
||||
if (lineCount > 1 && lineCount === contents.split(/ \d+\n/).length) {
|
||||
if (lineCount >= 1 && lineCount === contents.split(/ \d+\n/).length) {
|
||||
console.log('Importing as collapsed stack format')
|
||||
return importFromBGFlameGraph(contents)
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
<script src="./simple.js"></script>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,24 +0,0 @@
|
||||
function a() {
|
||||
b();
|
||||
c();
|
||||
}
|
||||
|
||||
function b() {
|
||||
d();
|
||||
}
|
||||
|
||||
function c() {
|
||||
d();
|
||||
}
|
||||
|
||||
function d() {
|
||||
let prod = 1;
|
||||
for (let i = 1; i < 10000000; i++) {
|
||||
prod *= i
|
||||
}
|
||||
return prod;
|
||||
}
|
||||
|
||||
console.profile('a')
|
||||
a();
|
||||
console.profileEnd('a')
|
||||
Reference in New Issue
Block a user