Class Timer

Timer helper for debugging performance issues.

Usage:

const t = new Timer();

t.log('start'); // 'start' is just an arbitrary tag, can be any string

doSlowThing(); t.log('doSlowThing');

doOtherSlowThing(); t.log('doOtherSlowThing');

// etc t.log('done');

logger.debug('timings', t.describe());

Hierarchy

  • Timer

Constructors

Properties

Methods

Constructors

Properties

times: {
    tag: string;
    val: bigint;
}[] = []

Methods

Generated using TypeDoc