blob: 4967684be668f6b7bdb8ee24b1840581caa50bd4 [file] [log] [blame]
// META: script=resources/profile-utils.js
promise_test(async () => {
const start = performance.now();
const profiler = new Profiler({ sampleInterval: 10 });
ProfileUtils.forceSample();
const trace = await profiler.stop();
const end = performance.now();
assert_greater_than(trace.samples.length, 0);
for (const sample of trace.samples) {
assert_between_inclusive(sample.timestamp, start, end);
}
}, 'sample timestamps use the current high-resolution time');