0.3.6 • Published 3 years ago

@rplan/measure-it v0.3.6

Weekly downloads
41
License
MIT
Repository
github
Last release
3 years ago

Build Status

@rplan/measure-it

Introduction

This is a toolkit to measures runtime.

Usage

Usage node

import { start, stop, track } from '@rplan/measure-it'

function doSomeThing() {
    // ...    
}

start('foo')
doSomeThing()
stop('foo')

// alternative

track('bar', doSomeThing)

console.log(sortedTrackData())

Usage node async

import { start, stop, track } from '@rplan/measure-it'

function doSomeThing() {
    // ...    
}

const startTime = start('foo')
await doSomeThing()
stop('foo', startTime)

// ...

Usage browser

import { start, track } from '@rplan/measure-it/lib/browser'

function doSomeThing() {
    // ...    
}

const stop = start('foo')
doSomeThing()
stop()

// alternative

track('bar', doSomeThing)

// press keys ctrl + 'l' to log performance results to the browser console
// press keys ctrl + 'r' to reset results
0.3.6

3 years ago

0.3.1

4 years ago

0.3.4

4 years ago

0.2.0

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.0.3

6 years ago

0.0.1

6 years ago