Contributing

Benchmark methodology

How the performance suite compares a plain Nuxt app, @nuxtjs/i18n and nuxt-i18n-micro, and which load profile to use.

pnpm test:performance builds the same generated app without i18n, with @nuxtjs/i18n and with this module, then load-tests each build. Run it when a change may affect build time, memory or throughput. Results for the current release are on Benchmarks; this page explains what they measure and how to reproduce them.

What is measured

LayerArtifact
AppGenerated fixture, nuxi build, Nitro node-server output (.output/server/index.mjs)
ModuleRoot dist/module.mjs from nuxt-module-build build; the suite fails on a jiti stub
Packages@i18n-micro/*/dist, built before the suite
LoadArtillery through @untestutils/perf

Vite SPA output, nuxi preview and dev servers are not measured. The defaults are 4 locales, a 10,000-key target (--keys 10000, which the fixture rounds up to a tree of 16,807 leaf keys per locale: branch 7, depth 5) and 3 consecutive runs (means reported), with paths for prefix_except_default.

Load profiles

--loadWindowUse
short (default)Warm 2 s at 10/s, main 10 s at 40/s, max 40 VUsDay to day and CI
midWarm 6 s at 6/s, main 30 s at 60/s, uncappedBetween the two
fullWarm 6 s at 6/s, main 60 s at 60/s, uncappedPublished numbers

Absolute RPS scales with the window and the machine. In an A/B of all three profiles the ranking of the three apps never changed, so short is the default and full is kept for the published page.

Cool-downs

--coolAfter buildBetween runsBetween targets
fast (default)200 ms500 ms500 ms
strict2 s3 s5 s

fast preserves the ranking; strict reproduces the older pauses.

Commands

# day to day: --load short --cool fast --runs 3
pnpm test:performance

# one target, or build times only
pnpm -C scripts cli performance --only micro
pnpm -C scripts cli performance --skip-load

# regenerate docs/guide/performance-results.md
pnpm -C scripts cli performance --load full --cool fast --runs 3 --only all

--only takes plain, i18n, micro or all. The results page is written only with --load full --only all.

Benchmarks

Performance

Maintenance commands