InstrumentTiming

Creates logs, counters and timings for methods that call instrument.

Description

The InstrumentTiming class allows you to create logs, countes and timings for methods that call instrument.

Constructors

Creates a new instance of InstrumentTiming.

public constructor(context: IContext, name: string, verb: string, logger: ILogger, counters: ICounters, counterTiming: CounterTiming, traceTiming: TraceTiming)

  • context: IContext - a context to trace execution through a call chain.
  • name: string - name
  • verb: string - verb or ‘call’
  • logger: ILogger - logger
  • counters: ICounters - counters
  • counterTiming: CounterTiming - counter
  • traceTiming: TraceTiming - time tracer

Instance methods

endFailure

Manages a failed service end.

endFailure(err: Error): void

  • err: Error - exception

endTiming

Ends the service.

endTiming(err?: Error): void

  • err: Error - exception

endSuccess

Manages a successful service end.

endSuccess(): void