Skip to main content
Home

Built and signed on GitHub Actions

Measure fn execution time.

This package works with Node.js, Deno, BunIt is unknown whether this package works with Cloudflare Workers, Browsers
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
It is unknown whether this package works with Browsers
JSR Score
100%
Published
a year ago (0.1.0)

measure-fn

measure-fn is a lightweight npm package that measures the execution time of JavaScript functions. It provides a simple and efficient way to analyze the performance of your functions.

Installation

You can install measure-fn via npm:

npm install measure-fn

Usage

import { measure } from 'measure-fn';

const yourFunction = () => {
  ...
}

console.log(measure(yourFunction)) // ms
console.log(measure(yourFunction, 's')) // seconds

License

This project is licensed under the MIT License - see the LICENSE file for details.

Built and signed on
GitHub Actions

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@jitaro/measure-fn

Import symbol

import * as measure_fn from "@jitaro/measure-fn";
or

Import directly with a jsr specifier

import * as measure_fn from "jsr:@jitaro/measure-fn";

Add Package

pnpm i jsr:@jitaro/measure-fn
or (using pnpm 10.8 or older)
pnpm dlx jsr add @jitaro/measure-fn

Import symbol

import * as measure_fn from "@jitaro/measure-fn";

Add Package

yarn add jsr:@jitaro/measure-fn
or (using Yarn 4.8 or older)
yarn dlx jsr add @jitaro/measure-fn

Import symbol

import * as measure_fn from "@jitaro/measure-fn";

Add Package

vlt install jsr:@jitaro/measure-fn

Import symbol

import * as measure_fn from "@jitaro/measure-fn";

Add Package

npx jsr add @jitaro/measure-fn

Import symbol

import * as measure_fn from "@jitaro/measure-fn";

Add Package

bunx jsr add @jitaro/measure-fn

Import symbol

import * as measure_fn from "@jitaro/measure-fn";