Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
devtools-timeline-parser
Advanced tools
Readme
Used to extract meaning metrics from raw timeline data generated in Chrome Devtools.
npm install devtools-timeline-parser
const Parser = require('devtools-timeline-parser');
const data = require('/path/to/raw/timeline/json/file');
const parser = new Parser(data);
// get CPU metrics
parser.cpu();
// outputs:
// {
// "idle": [
// {
// "timeOffset": 0, // in millisecond
// "load": 0
// }
// ],
// "loading": [...],
// "painting": [...],
// "rendering": [...],
// "scripting": [...],
// "other": [
// {
// "timeOffset": 0,
// "load": 0
// },
// {
// "timeOffset": 12.713740000009537,
// "load": 0.014905127416952567
// },
// ...
// ]
// }
// get memory metrics
parser.memory();
// outputs:
// [
// {
// "startTime": 749744928.729,
// "startTimeOffest": 560.636999964714,
// "documents": 19,
// "jsEventListeners": 505,
// "jsHeapSizeUsed": 23592960,
// "nodes": 6453
// },
// ...
// ]
// get FPS metrics
parser.frames();
// outputs:
// [
// {
// "startTime": 749744391.189,
// "startTimeOffset": 23.05400002002716,
// "endTime": 749744791.936,
// "duration": 400.74699997901917,
// "timeByCategory": {
// "other": 2.9880001544952393,
// "rendering": 0.4479999542236328,
// "painting": 0.36000001430511475
// },
// "cpuTime": 3.796000123023987,
// "idle": false,
// "layerTree": null,
// "_paints": [],
// "_mainFrameId": 304
// },
// ...
// ]
// get top down profile tree and find out time-consuming profiles
const topDownRootNode = parser.topDown();
Parser.traverseTopDownTree(topDownRootNode, (node, depth) => {
if (node.selfTime >= 16 && node.selfTime !== Infinity) {
console.log({
id: node.id,
selfTime: node.selfTime,
totalTime: node.totalTime,
eventArgs: node.event.args,
});
}
});
// outputs:
// { id: 'CompositeLayers',
// selfTime: 20.591999650001526,
// totalTime: 20.941999673843384,
// eventArgs: { layerTreeId: 1 } }
// { id: 'EvaluateScript',
// selfTime: 42.007999897003174,
// totalTime: 97.35699999332428,
// eventArgs:
// { data:
// { columnNumber: 0,
// frame: '16DBFDE9A1489A570B1EEE14792DB5A9',
// lineNumber: 0,
// url:
// 'https://www.apple.com/metrics/ac-analytics/2.12.0/scripts/ac-analytics.js' } } }
# Run demo script
$ node examples/demo.js
# Then check generated CPU.json, Memory.json and Frames.json files
This project heavily borrows ideas from a depreacted project devtools-timeline-model.
But due to the uncompiled TypeScript files in latest chrome-devtools-frontend package, this repo still uses a legacy version 1.0.698043 of it.
MIT
FAQs
Extract meaning metrics from raw timeline data generated in Chrome Devtools
The npm package devtools-timeline-parser receives a total of 847 weekly downloads. As such, devtools-timeline-parser popularity was classified as not popular.
We found that devtools-timeline-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.