Frontmatter
| id | 19133 |
| title | Pin Neo.util.Performance: timing samples, averages and the sample window |
| state | Closed |
| labels | enhancementhelp wantedgood first issuecontributor-experiencehacktoberfestaitesting |
| assignees | Harbor404 |
| createdAt | Sep 23, 2026, 4:27 PM |
| updatedAt | Oct 1, 2026, 11:46 AM |
| githubUrl | https://github.com/neomjs/neo/issues/19133 |
| author | neo-opus-ada |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| contentTrust | |
| projected | |
| quarantined | 0 |
| signals | [] |
| blockedBy | [] |
| blocking | [] |
| closedAt | Oct 1, 2026, 11:46 AM |
Pin Neo.util.Performance: timing samples, averages and the sample window
Closed
v13.2.0/archive-v13-2-0-chunk-23
enhancementhelp wantedgood first issuecontributor-experiencehacktoberfestaitesting

Harbor404
Oct 1, 2026, 4:53 AM
Claiming this one as a first-time contributor to Neo.mjs. I will add test/playwright/unit/util/Performance.spec.mjs covering the table above, without touching src/. If any row disagrees with the current implementation I will raise it here first.
Harbor404 cross-referenced by PR #19342 on Oct 1, 2026, 4:57 AM
tobiu assigned to @Harbor404 on Oct 1, 2026, 10:26 AM
tobiu closed this issue on Oct 1, 2026, 11:46 AM
Welcome 👋
Neo.util.Performanceis a tiny stopwatch the engine uses to measure its own hot paths:markStart(key),markEnd(key), and a rolling average over the last ten samples. It runs in plain Node and has no test yet. A good first spec, with one fun twist: you control the clock.This is a good first issue for Hacktoberfest 2026. It needs Node.js and a clone of this repository: no Docker, no AI setup.
Set up once: follow Set up the engine from a clone, including
npm run bundle-browser-deps: without it the unit suite selects zero tests.Where things live
src/util/Performance.mjs, a singleton withmarkStart,markEnd,getAverage,getSma,getMetricsandsampleSize: 10test/playwright/unit/util/Performance.spec.mjstest/playwright/unit/util/Array.spec.mjs(thesetup()call and imports)performance.nowinside a test (save the original and restore it afterwards) so thatmarkEndsees the numbers you choose.What to cover
markStart(k), thenmarkEnd(k)markEnd(k)with nomarkStart(k)markEnd(k)twice after onemarkStart(k)markEndresets the startgetAverage(k)getAverage('never-used')0getSma(k)getAverage(k)getMetrics(){[key]: {samples, start}}; changing the returnedsamplesarray does not change the singleton's dataDone when
test/playwright/unit/util/Performance.spec.mjsexists, following the pattern file's setup.test(...)per table row.src/.npm run test-unit -- test/playwright/unit/util/Performance.spec.mjspasses.npm run test-unitpasses.Out of scope
The
remotewiring (how the main thread calls these methods) and where the engine callsmarkStart.While you wait for review
You just pinned one small piece of a multi-threaded application engine: in Neo.mjs your app's code runs inside a web worker, and the main thread only paints. Two things worth ten minutes:
npm run build-themes -- -n -e dev -t allandnpm run server-start, openapps/workstation/, and drag a tab out of the browser window. It becomes its own OS window, still running, with the same component instances and the same worker. Benefits: Introduction explains why that is possible.help wantedissues are within reach after this one.Maintainer notes
Curated under #18985 (Hacktoberfest 2026). Found work: no unit or component spec names this module on
dev(2026-09-23). Live latest-open sweep: the latest 20 open issues at 2026-09-23T14:24Z; no equivalent (theNeo.util.Performancetitle search returns one closed issue). A2A: no claim on this scope. Memory Core: no prior decision.Origin Session ID: 3be453e4-8b04-4865-be62-4cff34f4e0c6