https://github.com/maxmellon/quick-timing
https://github.com/maxmellon/quick-timing
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/maxmellon/quick-timing
- Owner: MaxMEllon
- License: mit
- Created: 2019-11-29T06:11:22.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-06-18T02:36:44.000Z (almost 2 years ago)
- Last Synced: 2025-06-30T19:06:03.494Z (12 months ago)
- Language: TypeScript
- Size: 2.69 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# quick-timing
[](https://badge.fury.io/js/quick-timing)
## About
You want to measure a function
Ex. Let's measure the `targetFunction()`
```javascript
const value = targetFunction()
```
In many cases has next code.
```javascript
performance.mark('start')
const value = targetFunction()
performance.mark('end')
performance.measure('targetFunction', 'start', 'end')
```
Just use this...
```javascript
import { measure } from 'quick-timing'
const value = measure(() => targetFunction())
```
> Like a `useMemo` interface in React.
## LICENSE
MIT