Lines Matching refs:data
297 function formatResult(data) {
300 for (const key of Object.keys(data.conf)) {
301 conf += ` ${key}=${JSON.stringify(data.conf[key])}`;
304 let rate = data.rate.toString().split('.');
307 return `${data.name}${conf}: ${rate}\n`;
310 function sendResult(data) {
313 process.send(data, () => {
324 process.stdout.write(formatResult(data));
358 const data = require('../test/fixtures/wpt/url/resources/urltestdata.json');
360 for (const item of data) {
373 * Generate an array of data for URL benchmarks to use.
374 * The size of the resulting data set is the original data size * 2 ** `e`.
375 * The 'wpt' type contains about 400 data points when `withBase` is true,
376 * and 200 data points when `withBase` is false.
377 * Other types contain 200 data points with or without base.
378 * @param {string} type Type of the data, 'wpt' or a key of `urls`
379 * @param {number} e The repetition of the data, as exponent of 2
391 // Roughly the size of WPT URL test data
394 throw new Error(`Unknown url data type ${type}`);