npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ooopsstudio/profiling

v0.9.0

Published

Bounded CPU profiling with explicit Inspector and Pyroscope integrations for Ooops System applications.

Readme

@ooopsstudio/profiling

Bounded CPU profiling for Ooops System applications. The managed runtime returns frozen, metadata-only capture summaries; raw .cpuprofile artifacts are available only through explicit privileged profiler and exporter contracts.

Install

pnpm add @ooopsstudio/profiling @ooopsstudio/core

Install @pyroscope/nodejs only when using the explicit Pyroscope provider:

pnpm add @pyroscope/nodejs

Managed profiling

Development lazily enables manual Node Inspector captures. Production is continuous-provider-only. Custom configuration accepts an explicit manual profiler, continuous provider, and at most two artifact destinations.

import {createDevelopmentProfiling} from '@ooopsstudio/profiling/development'

const profiling = await createDevelopmentProfiling({
  resource: {
    serviceName: 'checkout-worker',
    deploymentEnvironment: 'development'
  }
})

const summary = await profiling.capture({durationMs: 1_000})
console.log(summary)

await profiling.flush()
await profiling.shutdown()

The managed API is intentionally limited to capture(), getStatus(), flush(), and retryable shutdown(). It does not expose queues, mutable manager state, raw profile data, heap profiles, telemetry events, or automatic incident capture.

Container registration

The root entrypoint registers a selected preset without eagerly importing Inspector or Pyroscope implementations.

import {registerProfiling} from '@ooopsstudio/profiling'
import {TOK} from '@ooopsstudio/core/tokens'

await registerProfiling(container, {preset: 'development'})

const profiling = container.get(TOK.Profiling)

Logging, errors, metrics, tracing, and lifecycle integrations are optional core ports. Their failures do not change capture, delivery, or shutdown behavior.

Explicit entrypoints

  • @ooopsstudio/profiling/development
  • @ooopsstudio/profiling/production
  • @ooopsstudio/profiling/custom
  • @ooopsstudio/profiling/profilers/inspector
  • @ooopsstudio/profiling/providers/pyroscope
  • @ooopsstudio/profiling/exporters/console
  • @ooopsstudio/profiling/exporters/memory
  • @ooopsstudio/profiling/observability

Inspector, Pyroscope, and the raw artifact exporters are privileged opt-in boundaries. Browser-safe and root imports do not load their Node implementations.

Pyroscope

import {createPyroscopeProfiling} from '@ooopsstudio/profiling/providers/pyroscope'

const continuous = createPyroscopeProfiling({
  applicationName: 'checkout-worker',
  connection: {
    mode: 'grafana-cloud',
    serverAddress: 'https://profiles.example.com/ingest',
    credentials: {
      username: process.env.PYROSCOPE_USERNAME!,
      password: process.env.PYROSCOPE_PASSWORD!
    }
  },
  resource: {
    serviceName: 'checkout-worker',
    deploymentEnvironment: 'production'
  }
})

Grafana Cloud and every credential-bearing endpoint require HTTPS. URLs with embedded credentials, query strings, or fragments are rejected. HTTP is accepted only for credential-free Alloy or self-hosted modes, and TLS verification is never weakened.

SDK-level PYROSCOPE_* environment overrides that could redirect traffic, inject credentials, or bypass bounded sampling are rejected before initialization. The optional peer is dynamically imported only by the provider entrypoint.

Observability attachment

The observability entrypoint exposes frozen raw domain events without mapping them to a concrete logging, errors, or metrics implementation. Use @ooopsstudio/bridges/profiling for the standard cross-domain mapping.

import {attachProfilingObservability} from '@ooopsstudio/profiling/observability'

const detach = attachProfilingObservability(profiling, (event) => {
  // Route the bounded event to a project-specific destination.
  console.info(event.kind)
})

detach()

One continuous provider and one manual CPU capture may own a Node process at a time. Timed-out physical work retains ownership until it settles, and repeated shutdown continues unresolved cleanup without starting duplicate finalizers.

License

MIT