Permalink
Browse files

chore: fix lint

  • Loading branch information...
vmarchaud committed Oct 9, 2018
1 parent 424b391 commit 85c3a08b1bba4d82f8a4fe21ff2cdd5b500ddb39
Showing with 10 additions and 6 deletions.
  1. +1 −1 src/import/chrome.ts
  2. +6 −1 src/import/index.ts
  3. +3 −4 src/import/v8cpuFormatter.ts
View
@@ -271,7 +271,7 @@ export function importFromChromeCPUProfile(chromeProfile: CPUProfile): Profile {
* There is two difference between the two formats :
* - Nodes are a tree in the old and a flat array in the new
* - Weigth are timestamps in the old and delta in the new
*
*
* For more informations : https://github.com/hyj1991/v8-profiler-node8
*/
export function importFromOldV8CPUProfile(content: OldCPUProfile): Profile {
View
@@ -1,7 +1,12 @@
import {Profile, ProfileGroup} from '../lib/profile'
import {FileSystemDirectoryEntry} from './file-system-entry'
import {importFromChromeCPUProfile, importFromChromeTimeline, isChromeTimeline, importFromOldV8CPUProfile} from './chrome'
import {
importFromChromeCPUProfile,
importFromChromeTimeline,
isChromeTimeline,
importFromOldV8CPUProfile,
} from './chrome'
import {importFromStackprof} from './stackprof'
import {importFromInstrumentsDeepCopy, importFromInstrumentsTrace} from './instruments'
import {importFromBGFlameGraph} from './bg-flamegraph'
@@ -1,4 +1,3 @@
import {CPUProfile, CPUProfileNode} from './chrome'
export interface OldCPUProfileNode {
@@ -28,10 +27,10 @@ function treeToArray(node: OldCPUProfileNode, nodes: CPUProfileNode[]) {
functionName: node.functionName,
lineNumber: node.lineNumber,
scriptId: node.scriptId,
url: node.url
url: node.url,
},
hitCount: node.hitCount,
children: node.children.map(child => child.id)
children: node.children.map(child => child.id),
})
node.children.forEach(child => {
return treeToArray(child, nodes)
@@ -57,6 +56,6 @@ export function chromeTree2nodes(content: OldCPUProfile): CPUProfile {
startTime: content.startTime * 1000000,
endTime: content.endTime * 1000000,
nodes: treeToArray(content.head, []),
timeDeltas: timestampsToDelta(content.timestamps, content.startTime)
timeDeltas: timestampsToDelta(content.timestamps, content.startTime),
}
}

0 comments on commit 85c3a08

Please sign in to comment.