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:
Jamie Wong
2018-05-08 23:13:38 -07:00
committed by GitHub
parent 2b9f7ffe1b
commit f9032f4100
22 changed files with 2 additions and 4105 deletions
+2 -2
View File
@@ -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
View File
@@ -1 +0,0 @@
<script src="./simple.js"></script>
File diff suppressed because it is too large Load Diff
-24
View File
@@ -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')