All Projects → micmro → Perfcascade

micmro / Perfcascade

Licence: mit
Responsive, SVG based HAR waterfall viewer

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Perfcascade

Nemetric
前端性能指标的监控,采集以及上报。用于测量第一个dom生成的时间(FP/FCP/LCP)、用户最早可操作时间(fid|tti)和组件的生命周期性能,,网络状况以及资源大小等等。向监控后台报告实际用户测量值。
Stars: ✭ 145 (-35.56%)
Mutual labels:  performance, performance-metrics, webperf
Sqip
"SQIP" (pronounced \skwɪb\ like the non-magical folk of magical descent) is a SVG-based LQIP technique.
Stars: ✭ 3,074 (+1266.22%)
Mutual labels:  svg, performance, webperf
Performance Bookmarklet
Performance-Bookmarklet helps to analyze the current page through the Resource Timing API, Navigation Timing API and User-Timing - requests by type, domain, load times, marks and more. Sort of a light live WebPageTest.
Stars: ✭ 997 (+343.11%)
Mutual labels:  performance, performance-metrics, webperf
X6
🚀 JavaScript diagramming library that uses SVG and HTML for rendering.
Stars: ✭ 2,686 (+1093.78%)
Mutual labels:  svg, diagram
Diagram Tools
A number of small tools for generating and manipulating diagrams, mostly based around Graphviz
Stars: ✭ 95 (-57.78%)
Mutual labels:  svg, diagram
Wavedrom
🌊 Digital timing diagram rendering engine
Stars: ✭ 1,668 (+641.33%)
Mutual labels:  svg, diagram
Diagram Vue
A editable SVG-based diagram component for Vue
Stars: ✭ 86 (-61.78%)
Mutual labels:  svg, diagram
Opbeat Node
DEPRECATED - See Elastic APM instead: https://github.com/elastic/apm-agent-nodejs
Stars: ✭ 155 (-31.11%)
Mutual labels:  performance, performance-metrics
Scouter
Scouter is an open source APM (Application Performance Management) tool.
Stars: ✭ 1,792 (+696.44%)
Mutual labels:  performance, performance-metrics
Speedracer
Collect performance metrics for your library/application.
Stars: ✭ 1,868 (+730.22%)
Mutual labels:  performance, performance-metrics
Myperf4j
High performance Java APM. Powered by ASM. Try it. Test it. If you feel its better, use it.
Stars: ✭ 2,281 (+913.78%)
Mutual labels:  performance, performance-metrics
React Pinpoint
An open source utility library for measuring React component render times.
Stars: ✭ 93 (-58.67%)
Mutual labels:  performance, performance-metrics
Navigation Timing
Navigation Timing
Stars: ✭ 92 (-59.11%)
Mutual labels:  performance, performance-metrics
Butterfly
🦋Butterfly,A JavaScript/React/Vue2 Diagramming library which concentrate on flow layout field. (基于JavaScript/React/Vue2的流程图组件)
Stars: ✭ 2,343 (+941.33%)
Mutual labels:  svg, diagram
Junitperf
⛵️Junit performance rely on junit5 and jdk8+.(java 性能测试框架)
Stars: ✭ 86 (-61.78%)
Mutual labels:  performance, performance-metrics
Front End Performance Checklist
🎮 더 빠르게 작동하는 프론트엔드 성능 체크리스트
Stars: ✭ 183 (-18.67%)
Mutual labels:  performance, performance-metrics
Front End Performance Checklist
🎮 The only Front-End Performance Checklist that runs faster than the others
Stars: ✭ 13,815 (+6040%)
Mutual labels:  performance, performance-metrics
Perf.rocks
Curated resources that help you build lightning fast websites
Stars: ✭ 206 (-8.44%)
Mutual labels:  performance, webperf
Pwmetrics
Progressive web metrics at your fingertipz
Stars: ✭ 1,243 (+452.44%)
Mutual labels:  performance, webperf
Lighthouse Batch
Run Lighthouse analysis over multiple sites in a single command
Stars: ✭ 83 (-63.11%)
Mutual labels:  performance, performance-metrics

PerfCascade

Responsive, SVG based HAR waterfall viewer .

npm version npm downloads Build status

Install via npm install perf-cascade
Live example: https://micmro.github.io/PerfCascade/

example screenshot

Contents

How to use PerfCascade

PerfCascade is exported with UMD, so you can use it as global object, via AMD (e.g. requireJS) or commonJS (internally it uses ES6 modules).

With ES6 Compatible Module Loader (Webpack, Babel, Typescript...)

Install the package

npm install perf-cascade --save
import {fromHar} from 'perf-cascade'

// `myHarDoc` represents your HAR doc

const perfCascadeSvg = fromHar(myHarDoc)
document.appendChild(perfCascadeSvg)

With TypeScript you can additionally import TypeDefinitions for ChartOptions (PerfCascade Options) and harFormat (namespace for HAR Typings)

As Global Object

When using PerfCascade without any module system it just exports as a global object perfCascade, you can use as following:

/** pass HAR `perfCascade.fromHar` to generate the SVG element*/
var perfCascadeSvg =  perfCascade.fromHar(harData)
document.appendChild(perfCascadeSvg)

Or with options:

/** override selected options for PerfCascade (all have defaults) */
var options = {
  showIndicatorIcons: false, //default: true
  leftColumnWidth: 30 //default: 25
}

var perfCascadeSvg =  perfCascade.fromHar(harData, options)
document.appendChild(perfCascadeSvg)

You can find the compiled (and minified) JS in the releases tab. For the basic version without zHAR support you need perf-cascade.min.js and some basic CSS styles perf-cascade.css.

Use via npm

You can install PerfCascade via NPM as well:

npm install perf-cascade

Directories:

  • node_modules/perf-cascade/dist/: bundled UMD modules and the css file in the directory.
  • node_modules/perf-cascade/lib: contains the full project exported as separate ES6 modules
  • node_modules/perf-cascade/types: Typescript typings

Options

see options.d.ts for source

Option Type Default Value Description
rowHeight number 23 Height of every request bar block plus spacer pixel (in px) default: 23
showAlignmentHelpers boolean true Show vertical lines to easier spot potential dependencies/blocking between requests
showMimeTypeIcon boolean true Show mime type icon on the left
showIndicatorIcons boolean true Show warning icons for potential issues on the left
leftColumnWidth number 25 Relative width of the info column on the left (in percent)
pageSelector HTMLSelectElement undefined DOM <select> element to use to select a run if the HAR contains multiple runs.
selectedPage number 0 Zero-based index of the page to initially render.
If selectedPage is larger than the number of pages the last page will be selected.
legendHolder HTMLElement
(DOM element)
undefined
(not shown)
If set a legend explaining the waterfall colours is rendered in the legendHolder DOM element.
showUserTiming boolean false If enabled the UserTiming data in WebPageTest's format _userTime.* get parsed and rendered as well.
Matching _userTime.startTimer-* and _userTime.endTimer-* entries get combined into one block.
showUserTimingEndMarker boolean false (requires showUserTiming to be true) If showUserTiming is enabled all _userTime.endTimer-* marker are hidden by default, only the UserTiming's start and duration is shown. This option also adds an _userTime.endTimer-* marker.

*.zhar - zipped HAR files

By loading /perf-cascade-file-reader.min.js as in this example you can use perfCascadeFileReader.readFile to read a zip file and convert it to a JSON HAR object.

perfCascadeFileReader.readFile(fileFromTheFileInput, fileName, function(error, data){
  if(error){
    // handle error
    console.error(error)
  }else{
    // handle success
    renderPerfCascadeChart(data)
  }
})

Optionally perfCascadeFileReader.readFile also takes a callback ((progress:number) => void) as a forth argument that gets called whenever a new unzip progress status is available.

Rendering other formats (than HAR)

PerfCascade is composed of a parser src/ts/transformers/har.ts that parsed HAR into PerfCascade's agnostic WaterfallDocs format and the renderer (see PerfCascade() in src/ts/main.ts that creates the chart SVG.

If you want to render another format, you could fork the repo and create a new parser in src/ts/transformers/ and implement a new fromMyNewFormat function similar to fromHar()in src/ts/main.ts that takes your format, calls its parser and then calls the main PerfCascade() function with it and returns it.

It would also be possible to separate the renderer into a separate package, if there is enough interest to justify the effort (create an issue and we can discuss it).

Dev

  • Start live-reload server and Typescript compiler with watch: npm run watch
  • Create uglified version: npm run build

See package.json for other useful tasks like linting, release etc.

Specs and resources

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].