@anio-js-foundation/fn-measure-execution-time

2.0.0 • Public • Published

@anio-js-foundation/fn-measure-execution-time

Measure execution time of a function.

import fnMeasureExecutionTime from "@anio-js-foundation/fn-measure-execution-time"

function myFunction() {
	return new Promise(resolve => {
		setTimeout(resolve, 500, "hi")
	})
}

const result = await fnMeasureExecutionTime(myFunction, 100)

// prints something like { value: "hi", execution_time: 502.820208 }
console.log(result)

Readme

Keywords

none

Package Sidebar

Install

npm i @anio-js-foundation/fn-measure-execution-time

Weekly Downloads

1

Version

2.0.0

License

MIT

Unpacked Size

1.26 kB

Total Files

3

Last publish

Collaborators

  • exory2024
  • dasdeo