Skip to content

ts-awesome/profiler

Repository files navigation

@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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published