How to use the @adonisjs/profiler.Profiler function in @adonisjs/profiler

To help you get started, we’ve selected a few @adonisjs/profiler examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github adonisjs / adonis-framework / packages / core / src / Ignitor / index.ts View on Github external
private _instantiateProfiler () {
    const profiler = new Profiler(this._getProfilerConfig())
    this.ioc.singleton('Adonis/Src/Profiler', () => profiler)
    this.ioc.alias('Adonis/Src/Profiler', 'Profiler')

    /**
     * Attach subscriber if exists
     */
    if (this._profilerSubscriber) {
      profiler.subscribe(this._profilerSubscriber)
    }

    this._bootstrapper = profiler.create('bootstrap', { intent: this._intent })
  }

@adonisjs/profiler

Profiler to time function calls in AdonisJs with context

MIT
Latest version published 2 years ago

Package Health Score

57 / 100
Full package analysis