Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
15 files changed:
{
"$schema": "https://json.schemastore.org/prettierrc",
{
"$schema": "https://json.schemastore.org/prettierrc",
- "arrowParens": "avoid",
"semi": false,
"singleQuote": true,
"trailingComma": "none"
"semi": false,
"singleQuote": true,
"trailingComma": "none"
* @returns
*/
export async function sleep (ms) {
* @returns
*/
export async function sleep (ms) {
- return new Promise(resolve => setTimeout(resolve, ms))
+ return new Promise((resolve) => setTimeout(resolve, ms))
* @param intervalMs
*/
async function setIntervalTimeoutBusyWait (timeoutMs, intervalMs = interval) {
* @param intervalMs
*/
async function setIntervalTimeoutBusyWait (timeoutMs, intervalMs = interval) {
- return new Promise(resolve => {
+ return new Promise((resolve) => {
const tries = Math.round(timeoutMs / intervalMs)
let count = 0
const triesSetInterval = setInterval(() => {
const tries = Math.round(timeoutMs / intervalMs)
let count = 0
const triesSetInterval = setInterval(() => {
Benchmark.save({ file: 'busy-wait', format: 'json', details: true }),
Benchmark.save({ file: 'busy-wait', format: 'chart.html', details: true }),
Benchmark.save({ file: 'busy-wait', format: 'table.html', details: true })
Benchmark.save({ file: 'busy-wait', format: 'json', details: true }),
Benchmark.save({ file: 'busy-wait', format: 'chart.html', details: true }),
Benchmark.save({ file: 'busy-wait', format: 'table.html', details: true })
format: 'table.html',
details: true
})
format: 'table.html',
details: true
})
format: 'table.html',
details: true
})
format: 'table.html',
details: true
})
Benchmark.save({ file: 'empty-array', format: 'json', details: true }),
Benchmark.save({ file: 'empty-array', format: 'chart.html', details: true }),
Benchmark.save({ file: 'empty-array', format: 'table.html', details: true })
Benchmark.save({ file: 'empty-array', format: 'json', details: true }),
Benchmark.save({ file: 'empty-array', format: 'chart.html', details: true }),
Benchmark.save({ file: 'empty-array', format: 'table.html', details: true })
Benchmark.save({ file: 'fibonacci', format: 'json', details: true }),
Benchmark.save({ file: 'fibonacci', format: 'chart.html', details: true }),
Benchmark.save({ file: 'fibonacci', format: 'table.html', details: true })
Benchmark.save({ file: 'fibonacci', format: 'json', details: true }),
Benchmark.save({ file: 'fibonacci', format: 'chart.html', details: true }),
Benchmark.save({ file: 'fibonacci', format: 'table.html', details: true })
format: 'table.html',
details: true
})
format: 'table.html',
details: true
})
format: 'table.html',
details: true
})
format: 'table.html',
details: true
})
Benchmark.save({ file: 'max', format: 'json', details: true }),
Benchmark.save({ file: 'max', format: 'chart.html', details: true }),
Benchmark.save({ file: 'max', format: 'table.html', details: true })
Benchmark.save({ file: 'max', format: 'json', details: true }),
Benchmark.save({ file: 'max', format: 'chart.html', details: true }),
Benchmark.save({ file: 'max', format: 'table.html', details: true })
*
*/
function promise () {
*
*/
function promise () {
- return new Promise(resolve => {
+ return new Promise((resolve) => {
}),
Benchmark.add('promise with then().catch()', () => {
asyncFunction()
}),
Benchmark.add('promise with then().catch()', () => {
asyncFunction()
format: 'table.html',
details: true
})
format: 'table.html',
details: true
})
format: 'table.html',
details: true
})
format: 'table.html',
details: true
})
format: 'table.html',
details: true
})
format: 'table.html',
details: true
})
format: 'table.html',
details: true
})
format: 'table.html',
details: true
})
format: 'table.html',
details: true
})
format: 'table.html',
details: true
})