Documentation/FbProfiler
classWORKER

FbProfiler

js/foo_uie_jsplitter.js:6058
FbProfiler(name)

Parameters

NameTypeDescription
namestring

Example

let test = new FbProfiler('test');
// do something time consuming
console.log(test.Time); // Outputs bare time in ms like "789"
test.Print(); // Outputs component name/version/assigned name like "Spider Monkey Panel v1.0.0: profiler (test): 789 ms"
propertyWORKERreadonly

Time

js/foo_uie_jsplitter.js:6071
Time: number
methodWORKER

Print

js/foo_uie_jsplitter.js:6084
Print(additionalMsg, printComponentInfo)

Parameters

NameTypeDescription
additionalMsg = ''optionalstring

string that will be prepended to the measured time

printComponentInfo = trueoptionalboolean

Example

let test = new FbProfiler('Group #1');
// Do smth #1
test.Print('\nTask #1:', false);
// Do smth #2
test.Print('\nTask #2:', false);
// Do smth
test.Print();
// Output:
// profiler (Group #1):
// Task #1: 789 ms"
// profiler (Group #1):
// Task #2: 1530 ms"
// Spider Monkey Panel v1.0.0: profiler (Group #1): 3541 ms"
methodWORKER

Reset

js/foo_uie_jsplitter.js:6078
Reset()