@neon-exchange/nash-perf
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

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())

Readme

Keywords

none

Package Sidebar

Install

npm i @neon-exchange/nash-perf

Weekly Downloads

2

Version

1.0.4

License

MIT

Unpacked Size

1.64 MB

Total Files

45

Last publish

Collaborators

  • ethanfast
  • localhuman
  • keyrock-ninjas
  • jankj
  • romulo.nash
  • canesin