Upload Kmake

This commit is contained in:
Gorochu
2026-05-26 23:36:42 -07:00
parent ba051b2f74
commit 555ec72358
41615 changed files with 13344630 additions and 1 deletions

View File

@ -0,0 +1,26 @@
'use strict';
const common = require('../common');
const assert = require('assert');
const { PerformanceObserver, performance } = require('perf_hooks');
const DELAY = 1000;
const ALLOWED_MARGIN = 10;
const expected = ['Start to Now', 'A to Now', 'A to B'];
const obs = new PerformanceObserver(common.mustCall((items) => {
items.getEntries().forEach(({ name, duration }) => {
assert.ok(duration > (DELAY - ALLOWED_MARGIN));
assert.strictEqual(expected.shift(), name);
});
}));
obs.observe({ entryTypes: ['measure'] });
performance.mark('A');
setTimeout(common.mustCall(() => {
performance.measure('Start to Now');
performance.measure('A to Now', 'A');
performance.mark('B');
performance.measure('A to B', 'A', 'B');
}), DELAY);