perf-deets
Advanced tools
Comparing version 1.0.8 to 1.0.9
{ | ||
"name": "perf-deets", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"main": "./perf.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
22
perf.js
@@ -19,3 +19,11 @@ let buffer = 40000; | ||
export async function end() { | ||
export function start() { | ||
globalThis.postMessage({ type: '__perf-deets:clear-perf' }); | ||
timings = {}; | ||
counts = {}; | ||
baseTime = performance.now(); | ||
} | ||
export async function stop() { | ||
Object.keys(timings).map(name => { | ||
@@ -36,10 +44,2 @@ let timing = timings[name]; | ||
export function start() { | ||
globalThis.postMessage({ type: '__perf-deets:clear-perf' }); | ||
timings = {}; | ||
counts = {}; | ||
baseTime = performance.now(); | ||
} | ||
export function record(name) { | ||
@@ -92,6 +92,6 @@ if (timings[name] == null) { | ||
break; | ||
case '__perf-deets:end-profile': | ||
end(); | ||
case '__perf-deets:stop-profile': | ||
stop(); | ||
break; | ||
} | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9677