This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function App() { | |
useEffect(() => { | |
sample_benchmark() | |
}, []); | |
return <div>Look in the development console to see your benchmark results!</div> | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function sample_benchmark() { | |
const benchOptions = { | |
id: "Suite Name", | |
log: customLogger, | |
minIterations: 3 | |
}; | |
const bench = new Bench(benchOptions); | |
// Benchmark Group 1 | |
bench.group("Group Name 1") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const benchOptions = { | |
id: "Benchmark Suite Name", | |
log: customLogger, | |
minIterations: 3 | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Helper variables | |
const consoleTableClone = console.table; | |
const LOG_ENTRY = { | |
GROUP: 'group', | |
TEST: 'test', | |
COMPLETE: 'complete' | |
}; | |
// Helper function to customLogger(...) | |
function convertItrsPerSecondToDecimal(itersPerSecond) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function sample_function_sleep_async() { | |
const sleep = ms => new Promise( | |
resolve => setTimeout(resolve, ms) | |
); | |
await sleep(100); | |
} | |
function sample_function_math_sqrt() { | |
Math.sqrt(100); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Patch( | |
UserInputCollection, | |
LookUp( | |
UserInputCollection, | |
ui_text = Label.Text | |
), | |
{ | |
user_input: Text(Checkbox.Value) | |
} | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If(sliderChange, | |
Set(sliderChange, false); | |
Patch( | |
UserInputCollection, | |
LookUp( | |
UserInputCollection, | |
ui_text = Label.Text | |
), | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If(datePickerChange, | |
Set(datePickerChange, false); | |
Patch( | |
UserInputCollection, | |
LookUp( | |
UserInputCollection, | |
ui_text = Label.Text | |
), | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Patch( | |
UserInputCollection, | |
LookUp( | |
UserInputCollection, | |
ui_text = Label.Text | |
), | |
{ | |
user_input: TextInput.Text | |
} | |
); |
NewerOlder