1.0.0 • Published 2 years ago

@ts-awesome/profiler v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@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

1.0.0

2 years ago

1.0.0-rc0

3 years ago