Comparing version 4.4.0 to 4.4.1
@@ -110,3 +110,3 @@ #!/usr/bin/env node | ||
if (dashDash.length !== 0) { | ||
const dashEntry = dashDash[0][0]; | ||
const dashEntry = dashDash[0][0] | ||
if (dashEntry === '-') { | ||
@@ -113,0 +113,0 @@ throw Error( |
@@ -17,4 +17,2 @@ 'use strict' | ||
const fsWriteFilePromise = promisify(fs.writeFile) | ||
module.exports = zeroEks | ||
@@ -42,2 +40,4 @@ | ||
fs.writeFileSync(`${folder}/meta.json`, JSON.stringify({ ...args, inlined })) | ||
if (collectOnly === true) { | ||
@@ -51,6 +51,3 @@ debug('collect-only mode bailing on rendering') | ||
try { | ||
const [file] = await Promise.all([ | ||
generateFlamegraph({...args, ticks, inlined, pid, folder}), | ||
fsWriteFilePromise(`${folder}/meta.json`, JSON.stringify({...args, inlined})) | ||
]) | ||
const file = generateFlamegraph({ ...args, ticks, inlined, pid, folder }) | ||
return file | ||
@@ -57,0 +54,0 @@ } catch (err) { |
@@ -17,3 +17,3 @@ 'use strict' | ||
function signal (fd, cb) { | ||
const s = new net.Socket({fd, readable: true, writable: true}) | ||
const s = new net.Socket({ fd, readable: true, writable: true }) | ||
s.unref() | ||
@@ -20,0 +20,0 @@ s.on('error', () => {}) |
@@ -23,5 +23,5 @@ 'use strict' | ||
${await createBundle()} | ||
visualizer(${JSON.stringify(trees)}, ${JSON.stringify({title, kernelTracing})}) | ||
visualizer(${JSON.stringify(trees)}, ${JSON.stringify({ title, kernelTracing })}) | ||
` | ||
const htmlPath = determineHtmlPath({name, outputHtml, workingDir, pid, outputDir: folder}) | ||
const htmlPath = determineHtmlPath({ name, outputHtml, workingDir, pid, outputDir: folder }) | ||
@@ -41,6 +41,6 @@ await html({ | ||
function determineHtmlPath ({name, outputHtml, workingDir, pid, outputDir}) { | ||
function determineHtmlPath ({ name, outputHtml, workingDir, pid, outputDir }) { | ||
if (name === '-') return '-' | ||
var htmlPath = (outputHtml || ( | ||
`{outputDir}${path.sep}{name}.html` | ||
`{outputDir}${path.sep}{name}.html` | ||
)).replace('{pid}', pid || 'UNKNOWN_PID') | ||
@@ -61,3 +61,3 @@ .replace('{timestamp}', Date.now()) | ||
pump( | ||
browserify({standalone: 'visualizer'}).add(path.resolve(__dirname, '..', 'visualizer')).bundle(), | ||
browserify({ standalone: 'visualizer' }).add(path.resolve(__dirname, '..', 'visualizer')).bundle(), | ||
concat(resolve), | ||
@@ -64,0 +64,0 @@ (err) => err && reject(err) |
@@ -26,3 +26,3 @@ 'use strict' | ||
if (!stack) return | ||
stack = stack.map(({name, kind, type}, ix) => { | ||
stack = stack.map(({ name, kind, type }, ix) => { | ||
name = name.replace(/ (:[0-9]+:[0-9]+)/, (_, loc) => ` [eval]${loc}`) | ||
@@ -42,3 +42,3 @@ // 0 no info | ||
if (info !== undefined) { | ||
const sameFn = info.length === 1 || info.every(({pos}, ix) => { | ||
const sameFn = info.length === 1 || info.every(({ pos }, ix) => { | ||
const prev = info[ix - 1] | ||
@@ -63,3 +63,3 @@ if (!prev) return true | ||
const [ lookup ] = stack[ix - 1] ? (stack[ix - 1].name.split(':')) : [] | ||
const callerMatch = inlined[key].find(({caller}) => caller.key === lookup) | ||
const callerMatch = inlined[key].find(({ caller }) => caller.key === lookup) | ||
if (callerMatch) S += 2 | ||
@@ -74,3 +74,3 @@ } | ||
if (type && type !== 'JS') name += ' [' + type + (kind ? ':' + kind : '') + ']' | ||
return {S, name, value: 0, top: 0} | ||
return { S, name, value: 0, top: 0 } | ||
}) | ||
@@ -80,3 +80,3 @@ | ||
addToMergedTree(stack.map(({S, name, value, top}) => ({S, name, value, top}))) | ||
addToMergedTree(stack.map(({ S, name, value, top }) => ({ S, name, value, top }))) | ||
// mutate original (save another loop over stack + extra objects) | ||
@@ -95,3 +95,3 @@ addToUnmergedTree(stack) | ||
const children = (ix === 0) ? merged.children : lastFrame.children | ||
const child = children.find(({name}) => name === frame.name) | ||
const child = children.find(({ name }) => name === frame.name) | ||
@@ -118,3 +118,3 @@ if (child === undefined) children.push(frame) | ||
const children = (ix === 0) ? unmerged.children : lastFrame.children | ||
const child = children.find(({fn, S}) => { | ||
const child = children.find(({ fn, S }) => { | ||
return fn === frame.name && S === frame.S | ||
@@ -143,7 +143,6 @@ }) | ||
function labelInitFrames (frames) { | ||
const startupBootstrapNodeIndex = frames.findIndex(({name}, ix) => { | ||
const startupBootstrapNodeIndex = frames.findIndex(({ name }, ix) => { | ||
if (frames[ix + 1] && /Module.runMain module\.js/.test(frames[ix + 1].name)) return false | ||
return /startup bootstrap_node\.js/.test(name) | ||
return /startup bootstrap_node\.js/.test(name) | ||
}) | ||
@@ -159,4 +158,4 @@ | ||
const moduleRunMainIndex = frames.findIndex(({name}, ix) => { | ||
return /Module.runMain module\.js/.test(name) | ||
const moduleRunMainIndex = frames.findIndex(({ name }, ix) => { | ||
return /Module.runMain module\.js/.test(name) | ||
}) | ||
@@ -172,8 +171,8 @@ | ||
// if there's so many modules to load, the module requiring may | ||
// if there's so many modules to load, the module requiring may | ||
// actually go into another tick, so far that's been observed where Module.load | ||
// is the first function, but there could be variation... | ||
const partOfModuleLoadingCycle = frames.findIndex(({name}, ix) => { | ||
return /(Module\.load|Module\._load|tryModuleLoad|Module\._extensions.+|Module\._compile|Module.require|require internal.+) module\.js/.test(name) | ||
const partOfModuleLoadingCycle = frames.findIndex(({ name }, ix) => { | ||
return /(Module\.load|Module\._load|tryModuleLoad|Module\._extensions.+|Module\._compile|Module.require|require internal.+) module\.js/.test(name) | ||
}) | ||
@@ -189,3 +188,2 @@ | ||
return frames | ||
@@ -197,2 +195,2 @@ } | ||
return frames.filter((frame) => preloadDirRx.test(frame.name) === false) | ||
} | ||
} |
@@ -33,4 +33,4 @@ 'use strict' | ||
stacks[n] = stacks[n] || [] | ||
stacks[n].unshift({name: line.trim().replace(/^LazyCompile:|Function:|Script:/, '')}) | ||
stacks[n].unshift({ name: line.trim().replace(/^LazyCompile:|Function:|Script:/, '') }) | ||
return stacks | ||
@@ -37,0 +37,0 @@ }, []) |
@@ -31,3 +31,3 @@ 'use strict' | ||
const sp = execSpawn(envString(cmd, {PORT: port + ''}), {stdio: 'inherit'}) | ||
const sp = execSpawn(envString(cmd, { PORT: port + '' }), { stdio: 'inherit' }) | ||
return new Promise((resolve, reject) => { | ||
@@ -41,3 +41,3 @@ sp.on('exit', (code, signal) => { | ||
function getTargetFolder ({outputDir, workingDir, name, pid}) { | ||
function getTargetFolder ({ outputDir, workingDir, name, pid }) { | ||
name = (outputDir || '{pid}.0x').replace(/{pid}/g, pid || 'UNKNOWN_PID') | ||
@@ -44,0 +44,0 @@ .replace(/{timestamp}/g, Date.now()) |
@@ -16,3 +16,3 @@ 'use strict' | ||
'--prof-process', '--preprocess', '-j', isolateLogPath | ||
], {stdio: ['ignore', 'pipe', 'pipe']}) | ||
], { stdio: ['ignore', 'pipe', 'pipe'] }) | ||
const close = isJson ? () => {} : () => sp.kill() | ||
@@ -19,0 +19,0 @@ const srcStream = isJson ? fs.createReadStream(isolateLogPath) : sp.stdout |
@@ -13,7 +13,7 @@ 'use strict' | ||
const privateProps = { | ||
workingDir: {type: 'string'} | ||
workingDir: { type: 'string' } | ||
} | ||
const valid = ajv.compile({ | ||
...schema, | ||
properties: {...schema.properties, ...privateProps} | ||
properties: { ...schema.properties, ...privateProps } | ||
} | ||
@@ -25,3 +25,3 @@ ) | ||
} | ||
const [{keyword, dataPath, params, message}] = valid.errors | ||
const [{ keyword, dataPath, params, message }] = valid.errors | ||
if (keyword === 'type') { | ||
@@ -28,0 +28,0 @@ const flag = dataPath.substr( |
{ | ||
"name": "0x", | ||
"version": "4.4.0", | ||
"version": "4.4.1", | ||
"description": "š„ single-command flamegraph profiling š„", | ||
@@ -11,3 +11,3 @@ "main": "index.js", | ||
"start": "./cmd.js --on-port 'npm run stress-rest-example' -- node examples/rest-api", | ||
"lint": "standard" | ||
"lint": "standard --fix | snazzy" | ||
}, | ||
@@ -29,7 +29,7 @@ "repository": { | ||
"ajv": "^6.5.3", | ||
"browserify": "^13.0.0", | ||
"browserify": "^16.2.2", | ||
"concat-stream": "^1.5.2", | ||
"d3-fg": "^6.3.1", | ||
"debounce": "^1.2.0", | ||
"debug": "^2.2.0", | ||
"debug": "^4.0.1", | ||
"end-of-stream": "^1.1.0", | ||
@@ -48,7 +48,7 @@ "env-string": "^1.0.0", | ||
"perf-sym": "^2.0.3", | ||
"pump": "^1.0.1", | ||
"pump": "^3.0.0", | ||
"pumpify": "^1.4.0", | ||
"semver": "^5.5.1", | ||
"single-line-log": "^1.0.1", | ||
"split2": "^2.0.1", | ||
"split2": "^3.0.0", | ||
"tachyons": "^4.9.1", | ||
@@ -59,5 +59,6 @@ "through2": "^2.0.1", | ||
"devDependencies": { | ||
"standard": "^6.0.7" | ||
"snazzy": "^8.0.0", | ||
"standard": "^12.0.1" | ||
}, | ||
"browserify-shim": {} | ||
} |
@@ -63,3 +63,3 @@ 'use strict' | ||
var folder = getTargetFolder({outputDir, workingDir, name, pid: proc.pid}) | ||
var folder = getTargetFolder({ outputDir, workingDir, name, pid: proc.pid }) | ||
@@ -69,10 +69,12 @@ if (onPort) status('Profiling\n') | ||
if (onPort) when(proc.stdio[5], 'data').then((port) => { | ||
const whenPort = spawnOnPort(onPort, port) | ||
whenPort.then(() => proc.kill('SIGINT')) | ||
whenPort.catch((err) => { | ||
proc.kill() | ||
cb(err) | ||
if (onPort) { | ||
when(proc.stdio[5], 'data').then((port) => { | ||
const whenPort = spawnOnPort(onPort, port) | ||
whenPort.then(() => proc.kill('SIGINT')) | ||
whenPort.catch((err) => { | ||
proc.kill() | ||
cb(err) | ||
}) | ||
}) | ||
}) | ||
} | ||
@@ -79,0 +81,0 @@ process.once('SIGINT', analyze) |
@@ -54,3 +54,2 @@ 'use strict' | ||
var prof | ||
var profExited = false | ||
@@ -62,8 +61,4 @@ function start () { | ||
folder = getTargetFolder({outputDir, workingDir, name, pid: proc.pid}) | ||
folder = getTargetFolder({ outputDir, workingDir, name, pid: proc.pid }) | ||
prof.on('exit', function (code) { | ||
profExited = true | ||
}) | ||
pump( | ||
@@ -85,11 +80,13 @@ prof.stdout, | ||
start() | ||
if (onPort) when(proc.stdio[5], 'data').then((port) => { | ||
const whenPort = spawnOnPort(onPort, port) | ||
whenPort.then(() => proc.kill('SIGINT')) | ||
whenPort.catch((err) => { | ||
proc.kill() | ||
cb(err) | ||
if (onPort) { | ||
when(proc.stdio[5], 'data').then((port) => { | ||
const whenPort = spawnOnPort(onPort, port) | ||
whenPort.then(() => proc.kill('SIGINT')) | ||
whenPort.catch((err) => { | ||
proc.kill() | ||
cb(err) | ||
}) | ||
}) | ||
}) | ||
} | ||
@@ -118,3 +115,2 @@ process.once('SIGINT', analyze) | ||
capture(10) | ||
@@ -129,7 +125,7 @@ function capture (attempts, translate) { | ||
try { | ||
translate = sym({silent: true, pid: proc.pid}) | ||
try { | ||
translate = sym({ silent: true, pid: proc.pid }) | ||
capture(attempts, translate) | ||
} catch (e) { | ||
setTimeout(capture, 300, attempts - 1) | ||
setTimeout(capture, 300, attempts - 1) | ||
} | ||
@@ -145,5 +141,5 @@ } else { | ||
} | ||
translate = translate || sym({silent: true, pid: proc.pid}) | ||
translate = translate || sym({ silent: true, pid: proc.pid }) | ||
if (!translate) { | ||
@@ -150,0 +146,0 @@ debug('unable to find map file') |
@@ -98,7 +98,7 @@ 'use strict' | ||
if (code|0 !== 0) { | ||
if (code | 0) { | ||
throw Object.assign(Error('Target subprocess error, code: ' + code), { code }) | ||
} | ||
const folder = getTargetFolder({outputDir, workingDir, name, pid: proc.pid}) | ||
const folder = getTargetFolder({ outputDir, workingDir, name, pid: proc.pid }) | ||
@@ -154,8 +154,8 @@ status('Process exited, generating flamegraph') | ||
if (match === false) return cb() | ||
if (lastOptimizedFrame === null) return cb() | ||
if (lastOptimizedFrame === null) return cb() | ||
const { fn, file } = lastOptimizedFrame | ||
// could be a big problem if the fn doesn't match | ||
if (fn !== inlinedFn) return cb() | ||
const key = `${fn} ${file}` | ||
@@ -179,6 +179,6 @@ inlined[key] = inlined[key] || [] | ||
if (match === false) return cb() | ||
if (ix === '-1') root = {file, fn, id, ix, pos, key: `${fn} ${file}`} | ||
if (ix === '-1') root = { file, fn, id, ix, pos, key: `${fn} ${file}` } | ||
else { | ||
lastOptimizedFrame = {file, fn, id, ix, pos, caller: root} | ||
} | ||
lastOptimizedFrame = { file, fn, id, ix, pos, caller: root } | ||
} | ||
} else process.stdout.write(s) | ||
@@ -185,0 +185,0 @@ } |
@@ -5,3 +5,3 @@ 'use strict' | ||
function createActions ({flamegraph, state}, emit) { | ||
function createActions ({ flamegraph, state }, emit) { | ||
state.typeFilters.bgs = state.typeFilters.unhighlighted | ||
@@ -14,4 +14,8 @@ | ||
focusNode, | ||
search, control, zoom, typeFilters, | ||
pushState, jumpToState | ||
search, | ||
control, | ||
zoom, | ||
typeFilters, | ||
pushState, | ||
jumpToState | ||
} | ||
@@ -31,3 +35,3 @@ | ||
function search () { | ||
return ({type, value}) => { | ||
return ({ type, value }) => { | ||
if (type === 'key') { | ||
@@ -53,3 +57,3 @@ if (!value) return flamegraph.clear() | ||
function control () { | ||
return ({type}) => { | ||
return ({ type }) => { | ||
switch (type) { | ||
@@ -96,3 +100,3 @@ case 'tiers': | ||
var zoomLevel = 1 | ||
return ({type}) => { | ||
return ({ type }) => { | ||
switch (type) { | ||
@@ -115,3 +119,3 @@ case 'in': | ||
const save = pushState() | ||
return ({name}) => { | ||
return ({ name }) => { | ||
const checked = state.typeFilters.exclude.has(name) | ||
@@ -146,3 +150,3 @@ if (checked) { | ||
function jumpToState () { | ||
return ({merged, nodeId, excludeTypes}) => { | ||
return ({ merged, nodeId, excludeTypes }) => { | ||
state.focusedNodeId = nodeId | ||
@@ -149,0 +153,0 @@ state.control.merged = merged |
'use strict' | ||
const button = (render) => ({label, pressed, disabled, width}, action) => render` | ||
const button = (render) => ({ label, pressed, disabled, width }, action) => render` | ||
<button | ||
@@ -18,3 +18,3 @@ class="f6 pointer br2 ba ph3 pv1 dib black mb2 mt1 ml1 mr1 ${disabled ? 'o-50 bg-silver' : ''}" | ||
module.exports = (render) => (state, action) => { | ||
const tiers = button(render)({label: 'Tiers', pressed: state.tiers}, () => action({type: 'tiers'})) | ||
const tiers = button(render)({ label: 'Tiers', pressed: state.tiers }, () => action({ type: 'tiers' })) | ||
const view = state.renderMergedBtn ? button(render)({ | ||
@@ -24,3 +24,3 @@ label: state.merged ? 'Unmerge' : 'Merge', | ||
pressed: state.merged | ||
}, () => action({type: 'view'})) : '' | ||
}, () => action({ type: 'view' })) : '' | ||
const optimized = button(render)({ | ||
@@ -30,3 +30,3 @@ label: 'Optimized', | ||
disabled: state.merged | ||
}, () => action({type: 'optimized'})) | ||
}, () => action({ type: 'optimized' })) | ||
const unoptimized = button(render)({ | ||
@@ -36,3 +36,3 @@ label: 'Unoptimized', | ||
disabled: state.merged | ||
}, () => action({type: 'not-optimized'})) | ||
}, () => action({ type: 'not-optimized' })) | ||
@@ -39,0 +39,0 @@ return render` |
@@ -14,23 +14,23 @@ 'use strict' | ||
if (/\[INIT]$/.test(name)) return {type: 'init'} | ||
if (/\[INIT]$/.test(name)) return { type: 'init' } | ||
if (/\[INLINABLE]$/.test(name)) return {type: 'inlinable'} | ||
if (/\[INLINABLE]$/.test(name)) return { type: 'inlinable' } | ||
if (!/\.m?js/.test(name)) { | ||
if (/\[CODE:RegExp]$/.test(name)) return {type: 'regexp'} | ||
if (/\[CODE:.*?]$/.test(name) || /v8::internal::.*\[CPP]$/.test(name)) return {type: 'v8'} | ||
if (/\.$/.test(name)) return {type: 'core'} | ||
if (/\[CPP]$/.test(name) || /\[SHARED_LIB]$/.test(name)) return {type: 'cpp'} | ||
if (/\[eval]/.test(name)) return {type: 'native'} // unless we create an eval checkbox | ||
// "native" is the next best label since | ||
// you cannot tell where the eval comes | ||
// from (app, deps, core) | ||
return {type: 'v8'} | ||
if (/\[CODE:RegExp]$/.test(name)) return { type: 'regexp' } | ||
if (/\[CODE:.*?]$/.test(name) || /v8::internal::.*\[CPP]$/.test(name)) return { type: 'v8' } | ||
if (/\.$/.test(name)) return { type: 'core' } | ||
if (/\[CPP]$/.test(name) || /\[SHARED_LIB]$/.test(name)) return { type: 'cpp' } | ||
if (/\[eval]/.test(name)) return { type: 'native' } // unless we create an eval checkbox | ||
// "native" is the next best label since | ||
// you cannot tell where the eval comes | ||
// from (app, deps, core) | ||
return { type: 'v8' } | ||
} | ||
if (/ native /.test(name)) return {type: 'native'} | ||
if (name.indexOf('/') === -1 || (/internal\//.test(name) && !/ \//.test(name))) return {type: 'core'} | ||
if (/node_modules/.test(name)) return {type: 'deps'} | ||
if (/ native /.test(name)) return { type: 'native' } | ||
if (name.indexOf('/') === -1 || (/internal\//.test(name) && !/ \//.test(name))) return { type: 'core' } | ||
if (/node_modules/.test(name)) return { type: 'deps' } | ||
return {type: 'app'} | ||
return { type: 'app' } | ||
} |
'use strict' | ||
module.exports = (render) => ({colors, enableOptUnopt}) => render` | ||
module.exports = (render) => ({ colors, enableOptUnopt }) => render` | ||
<div id=key class='fr dn db-l mr1'> | ||
@@ -12,10 +12,10 @@ <div class='fl' style="margin-right: 5px;">cold</div> | ||
${enableOptUnopt | ||
? render`<div class='cf f6 silver mt3 pt1' style='margin-left:-.35em'> | ||
? render`<div class='cf f6 silver mt3 pt1' style='margin-left:-.35em'> | ||
<span>* optimized</span> <span class="indent">~ unoptimized</span> | ||
</div> | ||
` | ||
: '' | ||
} | ||
: '' | ||
} | ||
</div> | ||
` |
@@ -9,5 +9,5 @@ 'use strict' | ||
` | ||
search.addEventListener('keydown', debounce(({ target }) => action({type: 'key', value: target.value}), 150)) | ||
search.addEventListener('keydown', debounce(({ target }) => action({ type: 'key', value: target.value }), 150)) | ||
return search | ||
} |
'use strict' | ||
module.exports = (render) => ({title}) => render` | ||
module.exports = (render) => ({ title }) => render` | ||
<h1 id=title class='sans-serif black-70 bg-white b lh-title measure-narrow measure-l f4 ml2 mt0 dib'> | ||
@@ -5,0 +5,0 @@ <style>@media (max-width: 584px) {#title {display: none}}</style> |
'use strict' | ||
const createHoc = (render) => ({bg, exclude, name, lbl, disabled = false}, action) => { | ||
const createHoc = (render) => ({ bg, exclude, name, lbl, disabled = false }, action) => { | ||
const pressed = !disabled && !exclude.has(name) | ||
@@ -13,3 +13,3 @@ return render` | ||
" | ||
onclick=${() => action({name})} | ||
onclick=${() => action({ name })} | ||
>${lbl || name}</button> | ||
@@ -19,13 +19,13 @@ ` | ||
module.exports = (render) => ({bgs, exclude, enableInlinable, renderInlinable}, action) => { | ||
module.exports = (render) => ({ bgs, exclude, enableInlinable, renderInlinable }, action) => { | ||
const hoc = createHoc(render) | ||
const app = hoc({bg: bgs.app, exclude, name: 'app'}, action) | ||
const deps = hoc({bg: bgs.deps, exclude, name: 'deps'}, action) | ||
const core = hoc({bg: bgs.core, exclude, name: 'core'}, action) | ||
const inlinable = renderInlinable ? hoc({bg: bgs['inlinable'], exclude, name: 'inlinable', disabled: !enableInlinable}, action) : '' | ||
const native = hoc({bg: bgs.native, exclude, name: 'native'}, action) | ||
const regexp = hoc({bg: bgs.regexp, exclude, name: 'regexp', lbl: 'rx'}, action) | ||
const v8 = hoc({bg: bgs.v8, exclude, name: 'v8'}, action) | ||
const cpp = hoc({bg: bgs.cpp, exclude, name: 'cpp'}, action) | ||
const init = hoc({bg: bgs.init, exclude, name: 'init'}, action) | ||
const app = hoc({ bg: bgs.app, exclude, name: 'app' }, action) | ||
const deps = hoc({ bg: bgs.deps, exclude, name: 'deps' }, action) | ||
const core = hoc({ bg: bgs.core, exclude, name: 'core' }, action) | ||
const inlinable = renderInlinable ? hoc({ bg: bgs['inlinable'], exclude, name: 'inlinable', disabled: !enableInlinable }, action) : '' | ||
const native = hoc({ bg: bgs.native, exclude, name: 'native' }, action) | ||
const regexp = hoc({ bg: bgs.regexp, exclude, name: 'regexp', lbl: 'rx' }, action) | ||
const v8 = hoc({ bg: bgs.v8, exclude, name: 'v8' }, action) | ||
const cpp = hoc({ bg: bgs.cpp, exclude, name: 'cpp' }, action) | ||
const init = hoc({ bg: bgs.init, exclude, name: 'init' }, action) | ||
@@ -32,0 +32,0 @@ return render` |
@@ -9,3 +9,3 @@ 'use strict' | ||
const titleCmp = require('./title') | ||
module.exports = (render) => ({state, actions}) => { | ||
module.exports = (render) => ({ state, actions }) => { | ||
const typeFilters = typeFiltersCmp(render) | ||
@@ -12,0 +12,0 @@ const key = keyCmp(render) |
@@ -5,5 +5,5 @@ 'use strict' | ||
<div class='fr dn db-l h-100 mr1'> | ||
<button class='h-100' onclick=${() => action({type: 'out'})}>ā</button> | ||
<button class='h-100' onclick=${() => action({type: 'in'})}>+</button> | ||
<button class='h-100' onclick=${() => action({ type: 'out' })}>ā</button> | ||
<button class='h-100' onclick=${() => action({ type: 'in' })}>+</button> | ||
</div> | ||
` |
@@ -20,5 +20,5 @@ 'use strict' | ||
const flamegraph = fg({ | ||
categorizer, | ||
tree, | ||
exclude: Array.from(exclude), | ||
categorizer, | ||
tree, | ||
exclude: Array.from(exclude), | ||
element: chart, | ||
@@ -53,8 +53,8 @@ topOffset: 55 | ||
const state = createState({colors, trees, exclude, kernelTracing, title: opts.title}) | ||
const state = createState({ colors, trees, exclude, kernelTracing, title: opts.title }) | ||
const actions = createActions({flamegraph, state}, (state) => { | ||
morphdom(iface, ui({state, actions})) | ||
const actions = createActions({ flamegraph, state }, (state) => { | ||
morphdom(iface, ui({ state, actions })) | ||
}) | ||
const iface = ui({state, actions}) | ||
const iface = ui({ state, actions }) | ||
const focusNode = actions.focusNode() | ||
@@ -61,0 +61,0 @@ const jumpToState = actions.jumpToState() |
@@ -6,3 +6,3 @@ 'use strict' | ||
module.exports = ({colors, trees, exclude, merged = false, kernelTracing, title}) => ({ | ||
module.exports = ({ colors, trees, exclude, merged = false, kernelTracing, title }) => ({ | ||
trees, | ||
@@ -12,6 +12,6 @@ focusedNodeId: null, | ||
colors: [ | ||
colorHash({top: 0, name: 'cold'}, 1, 100), | ||
colorHash({top: 1, name: 'luke-warm'}, 1, 100), | ||
colorHash({top: 3, name: 'warm'}, 1, 100), | ||
colorHash({top: 10, name: 'hot'}, 1, 100) | ||
colorHash({ top: 0, name: 'cold' }, 1, 100), | ||
colorHash({ top: 1, name: 'luke-warm' }, 1, 100), | ||
colorHash({ top: 3, name: 'warm' }, 1, 100), | ||
colorHash({ top: 10, name: 'hot' }, 1, 100) | ||
], | ||
@@ -18,0 +18,0 @@ enableOptUnopt: !merged |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1757
87414
2
+ Addedbrowser-resolve@2.0.0(transitive)
+ Addedbrowserify@16.5.2(transitive)
+ Addedbrowserify-zlib@0.2.0(transitive)
+ Addedbuffer@5.2.1(transitive)
+ Addeddebug@4.3.7(transitive)
+ Addeddetective@5.2.1(transitive)
+ Addeddomain-browser@1.2.0(transitive)
+ Addedevents@2.1.0(transitive)
+ Addedhttps-browserify@1.0.0(transitive)
+ Addedmkdirp-classic@0.5.3(transitive)
+ Addedmodule-deps@6.2.3(transitive)
+ Addedms@2.1.3(transitive)
+ Addedos-browserify@0.3.0(transitive)
+ Addedpako@1.0.11(transitive)
+ Addedpump@3.0.2(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedsplit2@3.2.2(transitive)
+ Addedstream-http@3.2.0(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedvm-browserify@1.1.2(transitive)
- Removedacorn@5.7.4(transitive)
- Removedbrowser-resolve@1.11.3(transitive)
- Removedbrowserify@13.3.0(transitive)
- Removedbrowserify-zlib@0.1.4(transitive)
- Removedbuffer@4.9.2(transitive)
- Removedconcat-stream@1.5.2(transitive)
- Removeddebug@2.6.9(transitive)
- Removeddetective@4.7.1(transitive)
- Removeddomain-browser@1.1.7(transitive)
- Removedevents@1.1.1(transitive)
- Removedhttps-browserify@0.0.1(transitive)
- Removedindexof@0.0.1(transitive)
- Removedmodule-deps@4.1.1(transitive)
- Removedms@2.0.0(transitive)
- Removedos-browserify@0.1.2(transitive)
- Removedpako@0.2.9(transitive)
- Removedprocess-nextick-args@1.0.7(transitive)
- Removedreadable-stream@2.0.6(transitive)
- Removedresolve@1.1.7(transitive)
- Removedstream-http@2.8.3(transitive)
- Removedto-arraybuffer@1.0.1(transitive)
- Removedtypedarray@0.0.7(transitive)
- Removedvm-browserify@0.0.4(transitive)
Updatedbrowserify@^16.2.2
Updateddebug@^4.0.1
Updatedpump@^3.0.0
Updatedsplit2@^3.0.0