Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
page.on('console', async msg => {
const args = msg.args();
const obj = args.length > 0 && (await args[0].jsonValue());
if (!obj) return;
if (obj.done) {
beautifyBenchmark.log();
// resolve(obj);
} else if (obj.cycle) {
beautifyBenchmark.add(obj.cycle);
} else if (obj.allDone) {
resolve();
} else {
console.log(obj);
}
});
await page.goto('http://127.0.0.1:9090', { timeout: 0 });
.on('complete', function done () {
console.log('\n Done!')
var result = benchmarks.getPercent('current')
benchmarks.log()
if (result < 90)
assert.fail('' + result + '%', '90%`', null, '>=', done)
})
.run({ 'async': false })
.on('complete', function done () {
console.log('\n Done!')
var result = benchmarks.getPercent('current')
benchmarks.log()
if (result < 95)
assert.fail('' + result + '%', '95%`', null, '>=', done)
})
.run({ 'async': false })
.on('cycle', event => {
if (BEAUTIFY){
benchmarks.add(event.target)
} else {
console.log(String(event.target))
}
})
.on('complete', () => {
.on('cycle', (event) => {
console.log(String(event.target));
bb.add(event.target);
})
.on('complete', () => {
.on('cycle', (event) => {
console.log(String(event.target));
bb.add(event.target);
})
.on('complete', () => {
.on('complete', function done() {
benchmarks.log();
})
.run({ 'async': false });
.on('complete', function done() {
benchmarks.log();
})
.run({ 'async': false });
.on('complete', function done() {
benchmarks.log();
})
.run({ 'async': false });
.on("cycle", event => {
if (event.target.error) {
event.target.error = {
stack: event.target.error.stack
};
}
bb.add(event.target);
})
.on("complete", () => {