@perf-util/frame-measure
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

Frame Measure

You can use this tool for metrics extraction from Chrome Devtools performance profile.

Motivation

For some performance-critical frontend applications it is very important to collect metrics based on frames' data (maximum frame time, dropped frames, avg FPS). However, it's almost impossible to parse chrome performance profile, because its format is undocumented and the only option is to view this report in the browser. In this case you can't automate your performance testing. This tool uses internal devtools models to extract frame and cpu metrics from the profile in consumable format.

Usage

import { DevToolsAPIWrapper } from '@perf-util/frame-measure';

const data = require('/path/to/raw/timeline/json/file');

const wrapper = new DevToolsAPIWrapper(data);

const cpuStats = wrapper.calculateCPUStats();
const frameStats = wrapper.calculateFrameStats();

License

MIT

/@perf-util/frame-measure/

    Package Sidebar

    Install

    npm i @perf-util/frame-measure

    Weekly Downloads

    2

    Version

    0.0.3

    License

    MIT

    Unpacked Size

    1.12 MB

    Total Files

    59

    Last publish

    Collaborators

    • deltazn