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

lieko-metrics

v0.0.5

Published

Super simple performance metrics helper • start/stop markers • nice console logs • avg/min/max stats • human durations (µs/ms/s/m) • zero dependencies

Downloads

488

Readme

LiekoMetrics

Super simple performance measurement helper
Works in Node.js, browsers, and via CDN — zero dependencies.

Measure code execution time with nice console output and human-readable durations (µs, ms, s, min).

Quick Start

1. Node.js / Bun / Deno (CommonJS or ESM)

// CommonJS
const perf = require('lieko-metrics');

// or ESM
import perf from 'lieko-metrics';

perf.start('my-task');
// ... your code ...
perf.stop('my-task');
// → ⏱️  my-task perf: 12.4ms

2. Browser – via CDN (recommended)

<!-- Latest version from jsDelivr -->
<script src="https://cdn.jsdelivr.net/npm/lieko-metrics@latest"></script>

<!-- Or specific version -->
<!-- <script src="https://cdn.jsdelivr.net/npm/[email protected]"></script> -->
<script>
  // Global instance ready to use
  liekoPerf.start('page-load');
  // ... your code ...
  liekoPerf.stop('page-load');

  // Or create your own instance
  const perf = new LiekoMetrics();
  perf.start('heavy-computation');
  // ...
  perf.stop('heavy-computation');
  perf.printSummary();
</script>

Most useful methods

perf.start('name')          // begin measuring
perf.stop('name')           // end + log + save
perf.printSummary()         // beautiful overview of all measurements

perf.getStats('name')       // → { count, total, average, min, max, latest }
perf.clear()                // reset everything

Real-world examples

// Single shot
perf.start('render-users');
renderComplexList(users);
perf.stop('render-users');

// Multiple runs → great for averages
for (let i = 0; i < 10; i++) {
  perf.start('api:fetch-users');
  await fetch('/api/users');
  perf.stop('api:fetch-users');
}

perf.printSummary();
// Example output:
// api:fetch-users:
//   Runs: 10
//   Avg:   342ms
//   Min:   281ms
//   Max:   419ms
//   Last:  355ms

Recommended naming style (hierarchical)

perf.start('page-home:total')
perf.start('page-home:database:users')
perf.start('page-home:render:recommendations')
perf.start('page-home:image:lazy-load')

// Stop in reverse order is a good practice

Features

  • Zero dependencies
  • Works in Node.js and modern browsers
  • Human-readable durations (34µs1m 5.2s)
  • Automatic console logging with emoji
  • Multi-run statistics (avg/min/max/latest)
  • Global liekoPerf instance in browser + class LiekoMetrics

Small, fast, console-friendly — perfect for quick debugging and finding slow parts of your code.

Happy profiling!