MCPcopy
hub / github.com/Zizzamia/perfume.js / end

Function end

src/steps/markStep.ts:44–55  ·  view source on GitHub ↗
(markName: string, customProperties = {}, doLogData = true)

Source from the content-addressed store, hash-verified

42 * End performance measurement
43 */
44 export const end = (markName: string, customProperties = {}, doLogData = true): void => {
45 if (!isPerformanceSupported() || !metrics[markName]) {
46 return;
47 }
48 // End Performance Mark
49 WP.mark(`mark_${markName}_end`);
50 delete metrics[markName];
51 const measure = performanceMeasure(markName);
52 if (doLogData) {
53 logData(markName, roundByFour(measure), customProperties);
54 }
55}
56
57/**
58 * Removes the named mark from the browser's performance entry buffer.

Callers 3

markNTBTFunction · 0.90
markStep.spec.tsFile · 0.90

Calls 4

isPerformanceSupportedFunction · 0.90
performanceMeasureFunction · 0.90
logDataFunction · 0.90
roundByFourFunction · 0.90

Tested by

no test coverage detected