Skip to content

Instantly share code, notes, and snippets.

View danielkon96's full-sized avatar
🏠
Working from home everyday

Daniel Kondrashevich danielkon96

🏠
Working from home everyday
View GitHub Profile
function App() {
useEffect(() => {
sample_benchmark()
}, []);
return <div>Look in the development console to see your benchmark results!</div>
}
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")
const benchOptions = {
id: "Benchmark Suite Name",
log: customLogger,
minIterations: 3
};
// Helper variables
const consoleTableClone = console.table;
const LOG_ENTRY = {
GROUP: 'group',
TEST: 'test',
COMPLETE: 'complete'
};
// Helper function to customLogger(...)
function convertItrsPerSecondToDecimal(itersPerSecond) {
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);
}
PowerAppsbutton.Run(
JSON(
UserInputCollection,
IncludeBinaryData
)
);
Patch(
UserInputCollection,
LookUp(
UserInputCollection,
ui_text = Label.Text
),
{
user_input: Text(Checkbox.Value)
}
);
If(sliderChange,
Set(sliderChange, false);
Patch(
UserInputCollection,
LookUp(
UserInputCollection,
ui_text = Label.Text
),
{
If(datePickerChange,
Set(datePickerChange, false);
Patch(
UserInputCollection,
LookUp(
UserInputCollection,
ui_text = Label.Text
),
{
Patch(
UserInputCollection,
LookUp(
UserInputCollection,
ui_text = Label.Text
),
{
user_input: TextInput.Text
}
);