MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / executeTest

Function executeTest

apps/ui/src/perf/properties/tests.ts:304–318  ·  view source on GitHub ↗
(func: Function)

Source from the content-addressed store, hash-verified

302}
303
304function executeTest(func: Function): string {
305 let total = 0;
306 for (let i = 0; i < average; i++) {
307 const start = time();
308 func();
309 const end = time();
310 const duration = end - start;
311 total += duration;
312 }
313
314 const avg = total / average;
315 const res = `${avg.toFixed(2)}`;
316
317 return res;
318}
319
320function setResultTime(time: string) {
321 return `\t${time}`;

Callers 13

addRemoveFunction · 0.85
setTextFunction · 0.85
setBackgroundColorFunction · 0.85
setBorderWidthsFunction · 0.85
setColorFunction · 0.85
setColorWithParentsFunction · 0.85
setFontSizeFunction · 0.85
setFontSizeWithParentsFunction · 0.85
setFontWeightFunction · 0.85
setFontWeightWithParentsFunction · 0.85
setBindingContextFunction · 0.85

Calls 2

funcFunction · 0.85
timeFunction · 0.70

Tested by

no test coverage detected