All Projects → iopipe → performance-node

iopipe / performance-node

Licence: Apache-2.0 license
Performance for Node.js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to performance-node

Nemetric
前端性能指标的监控,采集以及上报。用于测量第一个dom生成的时间(FP/FCP/LCP)、用户最早可操作时间(fid|tti)和组件的生命周期性能,,网络状况以及资源大小等等。向监控后台报告实际用户测量值。
Stars: ✭ 145 (+752.94%)
Mutual labels:  performance-metrics, performance-analysis
Lighthouse
Automated auditing, performance metrics, and best practices for the web.
Stars: ✭ 23,903 (+140505.88%)
Mutual labels:  performance-metrics, performance-analysis
Sitespeed.io
Sitespeed.io is an open source tool that helps you monitor, analyze and optimize your website speed and performance, based on performance best practices advices from the coach and collecting browser metrics using the Navigation Timing API, User Timings and Visual Metrics (FirstVisualChange, SpeedIndex & LastVisualChange).
Stars: ✭ 4,255 (+24929.41%)
Mutual labels:  performance-metrics, performance-analysis
Speedracer
Collect performance metrics for your library/application.
Stars: ✭ 1,868 (+10888.24%)
Mutual labels:  performance-metrics, performance-analysis
Lighthouse Batch
Run Lighthouse analysis over multiple sites in a single command
Stars: ✭ 83 (+388.24%)
Mutual labels:  performance-metrics, performance-analysis
Sparklens
Qubole Sparklens tool for performance tuning Apache Spark
Stars: ✭ 345 (+1929.41%)
Mutual labels:  performance-metrics, performance-analysis
Inspectit
inspectIT is the leading Open Source APM (Application Performance Management) tool for analyzing your Java (EE) applications.
Stars: ✭ 513 (+2917.65%)
Mutual labels:  performance-metrics, performance-analysis
compile-time-perf
Measures high-level timing and memory usage metrics during compilation
Stars: ✭ 64 (+276.47%)
Mutual labels:  performance-metrics, performance-analysis
Pcm
Processor Counter Monitor
Stars: ✭ 1,240 (+7194.12%)
Mutual labels:  performance-metrics, performance-analysis
Stackimpact Nodejs
DEPRECATED StackImpact Node.js Profiler - Production-Grade Performance Profiler: CPU, memory allocations, async calls, errors, metrics, and more
Stars: ✭ 46 (+170.59%)
Mutual labels:  performance-metrics, performance-analysis
Stackimpact Go
DEPRECATED StackImpact Go Profiler - Production-Grade Performance Profiler: CPU, memory allocations, blocking calls, errors, metrics, and more
Stars: ✭ 276 (+1523.53%)
Mutual labels:  performance-metrics, performance-analysis
Myperf4j
High performance Java APM. Powered by ASM. Try it. Test it. If you feel its better, use it.
Stars: ✭ 2,281 (+13317.65%)
Mutual labels:  performance-metrics, performance-analysis
docker-google-lighthouse-puppeteer
Google Lighthouse + Puppeteer / Docker Image
Stars: ✭ 29 (+70.59%)
Mutual labels:  performance-metrics, performance-analysis
ember-appmetrics
Ember library used to measure various metrics in your Ember app with ultra simple APIs.
Stars: ✭ 16 (-5.88%)
Mutual labels:  performance-metrics, performance-analysis
perfmonger
No description or website provided.
Stars: ✭ 39 (+129.41%)
Mutual labels:  performance-metrics, performance-analysis
Goappmonitor
Golang application performance data monitoring.
Stars: ✭ 478 (+2711.76%)
Mutual labels:  performance-metrics, performance-analysis
PerfSpect
system performance characterization tool based on linux perf
Stars: ✭ 45 (+164.71%)
Mutual labels:  performance-metrics, performance-analysis
performance-budget-plugin
Perfromance budget plugin for Webpack (https://webpack.js.org/)
Stars: ✭ 65 (+282.35%)
Mutual labels:  performance-metrics, performance-analysis
Stackimpact Java
StackImpact Java Profiler - Production-Grade Performance Profiler: CPU, locks, runtime metrics, and more
Stars: ✭ 7 (-58.82%)
Mutual labels:  performance-metrics, performance-analysis
Junitperf
⛵️Junit performance rely on junit5 and jdk8+.(java 性能测试框架)
Stars: ✭ 86 (+405.88%)
Mutual labels:  performance-metrics, performance-analysis

Performance for Node.js

CircleCI styled with prettier semantic-release

A superset of the User Timing API (window.performance) for Node.js

Uses process.hrtime to capture marks + measures to gain deeper visibility into the timings that you define in your application.

0 Dependencies!

Requirements

  • Node >= 4.3.2
  • NPM >= 2.14.12

Install

With yarn (recommended) in project directory:

yarn add performance-node

With npm in project directory:

npm install performance-node

Then, run your application:

const Perf = require('performance-node');

const timeline = new Perf();

timeline.mark('foo-start');
// delay(10)
timeline.mark('foo-end');
timeline.measure('foo-measure', 'foo-start', 'foo-end');

const myMeasure = timeline.getEntriesByName('foo-measure')[0];
// {name: 'foo-measure', startTime: 1.2, duration: 10.5, entryType: 'measure'}

Methods

const Perf = require('performance-node');

const timeline = new Perf();

// set marks
timeline.mark('foo-start');
timeline.mark('foo-end');

// create a measurement
timeline.measure('foo-measure', 'foo-start', 'foo-end');

// get all timeline entries (marks + measures)
timeline.getEntries();

// get all entries with the same name
timeline.getEntriesByName('foo-start');

// get all entries with the same type
timeline.getEntriesByType('measure');

// clear marks
timeline.clearMarks();

// clear measures
timeline.clearMeasures();

// clear all entries
timeline.clear();

// get a point in time in milliseconds
timeline.now();

Config

offset (number: optional)

By default, the startTime of each mark is calculated by subracting the construction time from process.hrtime. If you would rather the startTime map as closely as possible to process.hrtime values, set offset: 0. You can also supply any number as a custom offset.

const Perf = require('performance-node');

const timeline = new Perf({ offset: 0 });

timeline.mark('foo-start');
// delay(10)
timeline.mark('foo-end');
timeline.measure('foo-measure', 'foo-start', 'foo-end');

const myMeasure = timeline.getEntriesByName('foo-measure')[0];
// {name: 'foo-measure', startTime: 227851.91, duration: 10.5, entryType: 'measure'}

timestamp (bool: optional = false)

Add a timestamp (unix epoch) value for each mark based on Date.now().

const Perf = require('performance-node');

const timeline = new Perf({ timestamp: true });

timeline.mark('foo-start');

const myMeasure = timeline.getEntriesByName('foo-start')[0];
// {name: 'foo-start', startTime: 1.2, duration: 0, entryType: 'mark', timestamp: 1501189303951}

Contributing

  • This project uses Prettier. Please execute npm run eslint -- --fix to auto-format the code before submitting pull requests.
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].