@neon-exchange/nash-perf
v1.0.4
Published
TypeScript implementation of Nash crypto routines
Downloads
120
Keywords
Readme
nash-perf
This is a micro library for reporting performance metrics to the nash telemetry service.
Installation
yarn add @neon-exchange/nash-perf
Usage
import { PerfClient } from '@neon-exchange/nash-perf'
const client = new PerfClient({
post: async req => {
await fetch('https://telemetry.sandbox.nash.io', {
method: 'post',
body: stringify(req)
})
},
tag: 'example'
})
conts exampleOperationMeasurement = client.start("exampleOperation")
// Perform expensive operation
exampleOperationMeasurement.end() // finish
// clean up on process end
process.on('SIGINT', () => client.flush())