← Webalkalmazás-alapok · projekttervezési csomag adatlapja
Nézd meg, miben segít
Elkülönített prototípusok és mérések
Kis, szabályozott kísérlettel ellenőriz kockázatos technikai feltételezést a megvalósítás kiválasztása előtt.
empirical-micro-benchmark-prototyping
Ezt a skillt használó ügynökök
Mikor hasznos?
Akkor használd, ha a dokumentáció bizonytalan vagy könyvtárak teljesítményígéretei ütköznek.
Miben segít neked?
- Éles hitelesítők és adatkapcsolatok nélkül készít elkülönített próbát.
- Valós bemenettel vizsgál kompatibilitást, megszakítást és erőforrásigényt.
- Azonos kimenetet és bemelegített mérések eloszlását hasonlítja össze.
Például ezt kérheted
Hasonlíts össze két feldolgozót valós fájlszerkezeteken, helyesség-, memória- és késleltetésméréssel. Legyen nagy érvényes és hibás fájl is. Egyező feldolgozott eredményt, ismételt időmérést és csúcsmemóriát hasonlíts össze; sebesség előtt rögzítsd a helyességi hibákat.
Részletes dokumentáció
Itt a skill eredeti útmutatóját, példáit és ellenőrzési szempontjait olvashatod az eredeti nyelven.
Összecsukás
Empirical Micro-Benchmark & Isolated Prototyping
When documentation is ambiguous or two candidate libraries make competing performance/behavior claims, a 15-minute isolated experiment settles what hours of speculation cannot.
Workflow
- Build in a clean, isolated scratch environment:
- Create prototypes in a temporary scratch directory outside production source paths.
- Never pass production credentials, personal API tokens, or live database URLs into an experimental script.
- Inspect package scripts before installing (
npm install --ignore-scriptswhen probing unknown packages).
- Design a minimal, falsifiable experiment:
- Test the exact riskiest assumption first:
- Functional probe: Does library X actually parse our real-world edge-case input, preserve types, and handle cancellation?
- Compatibility probe: Does it bundle cleanly with our TypeScript/ESM/bundler configuration without polyfill hacks?
- Resource probe: What is its cold-start time, peak heap memory (
process.memoryUsage()), and behavior under backpressure?
- Test the exact riskiest assumption first:
- Run fair, controlled micro-benchmarks:
- When comparing performance between Candidate A and Candidate B:
- Use representative data shapes and sizes (e.g., 100, 10,000, and 100,000 items), not trivial 3-element toy arrays.
- Include a warm-up phase so JIT compilation and module loading are separated from steady-state throughput.
- Measure distribution metrics (median/p50, p95, p99 latency, throughput, and memory allocation), not just a single
Date.now()run. - Verify that both candidates produce the exact same valid output (a fast function that skips validation or drops data is not a valid winner).
- When comparing performance between Candidate A and Candidate B:
- Preserve artifacts and clean up:
- Record the exact script, Node/runtime version, hardware context, and raw numbers in the research summary so findings remain auditable.
- Remove temporary packages and scratch files so the repository working tree stays completely clean.
Csomagban lévő fájlok 1
SKILL.md
