@neon-exchange/nash-perf

TypeScript implementation of Nash crypto routines

Usage no npm install needed!

<script type="module">
  import neonExchangeNashPerf from 'https://cdn.skypack.dev/@neon-exchange/nash-perf';
</script>

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