0.3.6 • Published 2 years ago

@rplan/measure-it v0.3.6

Weekly downloads
41
License
MIT
Repository
github
Last release
2 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

2 years ago

0.3.1

3 years ago

0.3.4

3 years ago

0.2.0

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.0.3

5 years ago

0.0.1

5 years ago