@the-/metrics
Performance measures for the-framework
Installation
$ npm install @the-/metrics --save
Usage
'use strict'
const { TheMetrics } = require('@the-/metrics')
async function tryExample() {
class Person {
hi() {
console.log('hi!')
}
}
const theMetrics = new TheMetrics({})
theMetrics.bindMethodCallCounter('person.hi', {
class: Person,
method: 'hi',
})
const person = new Person()
person.hi()
person.hi()
console.log(theMetrics.data)
}
tryExample().catch((err) => console.error(err))
API Guide
- module:@the-/metrics.counters
- module:@the-/metrics
- module:@the-/metrics.TheMetrics
See API Guide for more detail
License
This software is released under the MIT License.