New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

jankmeter

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jankmeter

Real-time performance monitoring toolbar for React apps

latest
Source
npmnpm
Version
0.1.6
Version published
Maintainers
1
Created
Source

jankmeter

Real-time performance monitoring toolbar for React apps. FPS, jank %, input delay, memory, network, React renders, and hydration timing — all in one zero-config overlay. Inspired by Linear's developer toolbar and built by dylsteck.

Demo

https://github.com/user-attachments/assets/f3f2d6c2-c7b6-489d-b869-9a07f978f4c9

Quick Start

// App.tsx or layout.tsx
import { JankMeter } from 'jankmeter/react';

export default function App() {
  return (
    <>
      <JankMeter />
      {/* your app */}
    </>
  );
}

Vite Plugin

// vite.config.ts
import { jankMeter } from 'jankmeter/vite';

export default {
  plugins: [jankMeter()],
};

For callbacks like onMetrics, use init() directly; the plugin only supports serializable config.

Next.js (App Router)

// app/layout.tsx
import { JankMeter } from 'jankmeter/next';

export default function RootLayout({ children }) {
  return (
    <html>
      <body>
        <JankMeter />
        {children}
      </body>
    </html>
  );
}

Script

import { init, destroy, getMetrics } from 'jankmeter';

init({
  onMetrics: (m) => console.log(m),
});

// Later: destroy();

Metrics

MetricSourceBrowsers
FPSrequestAnimationFrame rolling windowAll
Jank %Dropped frames / expected framesAll
DelayEvent Timing API (INP-style)Chrome 96+
Memoryperformance.memoryChrome only
Networkfetch/XHR instrumentation + PerformanceObserverAll
Reactbippy + DevTools hookAll (with React)
HydrationFirst commit timingAll (with SSR)

Configuration

interface JankMeterConfig {
  enabled?: boolean;        // default: true
  shortcut?: string;        // default: 'Ctrl+Shift+M' — supports 'F2', 'Ctrl+Shift+K', etc.
  throttleMs?: number;      // DOM update interval, default: 500
  maxHistory?: number;      // sparkline data points, default: 60
  onMetrics?: (metrics: AllMetrics) => void;
}

Features

  • Zero config — drop in and go
  • Shadow DOM — styles never leak into your app
  • Auto-calibrates — detects 60/90/120/144Hz displays
  • Keyboard shortcutCtrl+Shift+M by default, configurable (e.g. F2, Ctrl+Shift+K)
  • Minimize to dot — severity-colored indicator
  • Download — export metrics as JSON
  • Network URL redaction — query strings and fragments stripped before storage to avoid leaking tokens in metrics/downloads
  • Production safe — three layers of tree-shaking (conditional exports, runtime guard, sideEffects: false)
  • SSR safe — no-ops on the server

Webpack Plugin

// webpack.config.js
const { JankMeterWebpackPlugin } = require('jankmeter/webpack');

module.exports = {
  plugins: [new JankMeterWebpackPlugin()],
};

Requires html-webpack-plugin. Dev mode only — automatically disabled in production builds. For callbacks like onMetrics, use init() directly; the plugin only supports serializable config.

Programmatic API

import { getMetrics } from 'jankmeter';

const snapshot = getMetrics();
// { fps, delay, memory, network, react, hydration }

Browser Support

BrowserFPSDelayMemoryNetworkReact
Chrome 96+FullFullFullFullFull
FirefoxFullN/AN/AFullFull
SafariFullN/AN/AFullFull
EdgeFullFullFullFullFull

Contributing

See CONTRIBUTING.md for how to contribute.

License

MIT

Keywords

performance

FAQs

Package last updated on 17 Mar 2026

Did you know?

Socket

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.

Install

Related posts