
Product
A Fresh Look for the Socket Dashboard
We’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
continuous-profiler
Advanced tools
It's a simple implementation of a continuous profiler that runs in a browser context. It facilitates the JS Self-Profiling API.
The built-in JS profiler will run as long as it has space in the sample buffer. In practice, this means that there is a limited duration that a single profiler can profile. This package implement continuous profiler which manages multiple JS profiler instances to profile user session without any duration limit.
At the time of writing this README, the JS Self-Profiling API is available in Chrome 94+, Edge 94+, and Opera 80+ browsers.
It also requires Document-Policy: js-profiling=true
HTTP header for the HTML document.
This package is available on npm:
npm install continuous-profiler # for npm
yarn add continuous-profiler # for yarn
Please, ensure that you set up the Document-Policy
HTTP header.
To use the profiler, import it like a regular module and call the .start()
method.
import { ContinuousProfiler } from "continuous-profiler";
const profiler = new ContinuousProfiler(
(trace) => {
sendTrace(JSON.stringify(trace));
},
{
sampleInterval: 10, // sample every 10ms
collectInterval: 10000 // collect every 10s
}
);
profiler.start();
window.addEventListener('unload', () => profiler.stop());
The first argument passed to the ContinuousProfiler
constructor
is a callback that will be called every 10 seconds with a trace.
The second argument are options where you can specify sample and collect intervals.
MIT
FAQs
Continuous Profiler that runs inside a browser
The npm package continuous-profiler receives a total of 2 weekly downloads. As such, continuous-profiler popularity was classified as not popular.
We found that continuous-profiler 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.
Product
We’ve redesigned the Socket dashboard with simpler navigation, less visual clutter, and a cleaner UI that highlights what really matters.
Industry Insights
Terry O’Daniel, Head of Security at Amplitude, shares insights on building high-impact security teams, aligning with engineering, and why AI gives defenders a fighting chance.
Security News
MCP spec updated with structured tool output, stronger OAuth 2.1 security, resource indicators, and protocol cleanups for safer, more reliable AI workflows.