0.1.0 • Published 4 years ago

quick-timing v0.1.0

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

quick-timing

About

You want to measure a function

Ex. Let's measure the targetFunction()

const value = targetFunction()

In many cases has next code.

performance.mark('start')
const value = targetFunction()
performance.mark('end')
performance.measure('targetFunction', 'start', 'end')

Just use this...

import { measure } from 'quick-timing'

const value = measure(() => targetFunction())

Like a useMemo interface in React.

LICENSE

MIT

0.1.0

4 years ago