@ts-awesome/profiler
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@ts-awesome/profiler

TypeScript friendly dead-simple profiler library

Base use

import {ProfilingSession} from "@ts-awesome/profiler"

const session = new ProfilingSession();

await session.auto('action 1', async () => {
  // something important happens here
});

await session.auto('action 2', 'group 1', async () => {
  // something important happens here
});

await session.auto('action 3', 'group 1', 'some description', async () => {
  // something important happens here
});

// manual way
const action4finish = session.start('action 4');
try {
  // something important happens here
} finally {
  action4finish();
}

const rawLogs = session.valueOf();
const humanReadable = session.toString();

License

May be freely distributed under the MIT license.

Copyright (c) 2022 Volodymyr Iatsyshyn and other contributors

Dependencies (0)

    Dev Dependencies (11)

    Package Sidebar

    Install

    npm i @ts-awesome/profiler

    Weekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    30.6 kB

    Total Files

    40

    Last publish

    Collaborators

    • ts-awesome-bot
    • viatsyshyn