Most performance claims in the JavaScript tooling space have the shelf life of milk. Someone installs a few packages on a quiet Tuesday morning, captures the terminal output, and publishes a dramatic bar chart. By the next sprint, one of the tools has shipped a patch that invalidates the whole thing. The post remains indexed by search engines. The chart keeps getting shared. The numbers, however, are already lying to you.

This is the rot that infects nearly all package manager benchmarks. They are event photography when what we need is a live feed.

A project called depjs/canary treats this problem as a machine responsibility rather than a content calendar task. It is a living benchmark that watches npm, pnpm, Yarn, and dep, then re-runs its entire suite the moment any of them publishes a new version. The results are public, continuous, and unavoidable. When something breaks, the repository stays red until it heals. There is no cherry-picking, no hiding behind an old blog post, and no assumption that last month’s winner still holds the crown.

Why Speed Claims Need an Expiration Date

JavaScript package managers do not stand still. The gap between minor versions can include rewritten resolution algorithms, altered hoisting strategies, or changes to how the global cache is keyed. A benchmark that captures npm 10.2.1 and pnpm 8.11.0 tells you almost nothing about how those same tools behave two releases later. Yet the web is full of definitive statements like “Tool X is three times faster” based on exactly that kind of frozen snapshot.

Worse, many tests ignore the conditions that define real developer pain. A package manager might blaze through an install in a warm, well-rehearsed environment and then crawl on a CI runner that starts with an empty disk. Without testing both extremes, the benchmark becomes a press release rather than usable engineering data.

How the Canary Automates Comparison

Every two hours, a job polls the npm registry. If a new version of npm, pnpm, Yarn, or dep appears, the canary wakes up. It does not wait for a human to notice the changelog. It immediately executes a full test matrix that pits all four managers against five popular, real-world packages. The selection includes heavy hitters like React, Next.js, and Vite, codebases that actual developers install every day. These are not synthetic micro-projects designed to flatter one particular tool.

This release-triggered approach matters because it ties measurement directly to change. If the benchmark only ran on a nightly schedule, it might miss a mid-day hotfix or swallow a regression for hours. By running specifically on new versions, the canary asks a direct question each time: did this release make things better or worse?

The Four Scenarios That Stress Different Muscles

The test matrix is built around four distinct setups that map directly to workflows you will recognize.

  • Cold cache, no lockfile. This is the fresh clone on a new laptop, or the first install after deleting node_modules. Nothing is cached. Nothing is pinned. The package manager has to resolve, fetch, and write everything from scratch.
  • Warm cache, with lockfile. This is the happy path for continuous integration when things go right. The lockfile exists locally, and the cache still holds the tarballs from a previous run. The tool should move fast because most decisions are already made.
  • Cold cache, with lockfile. Here the lockfile is present, but the cache has been wiped. The manager can skip dependency resolution, yet it still has to download every byte across the network. This isolates network speed from resolution speed.
  • Warm cache, no lockfile. The cache is hot, but the lockfile is gone. The package manager must re-resolve the dependency tree before it can even begin extracting files. This tests the efficiency of the solver and the metadata parser under ideal network conditions.

Each scenario is executed five times, and the canary keeps the median result. That single choice kills a lot of noise. One transient network hiccup or a brief spike in registry latency cannot hijack the narrative. The outlier gets ignored; the typical experience gets recorded.

Smoke Tests Beat Empty Timers

מהירות גולמית קל לזייף אם לא מוודאים את התוצאה. מנהל חבילות (package manager) יכול לדלג על שלבי postinstall, להרוס כמה symlinks, או להתקין גרסאות לא נכונות ועדיין להציג חותמת זמן מרשימה. ה-canary מסרב להסתפק בטיימר. לאחר סיום ההתקנה, הוא אכן מריץ את הקוד שהותקן.

לדוגמה, הוא מפעיל אפליקציית Express ומוודא שהשרת מתחיל להקשיב בפורט (port) המצופה. אם הקוד לא רץ, הבנצ'מרק נכשל לחלוטין. בדיקת העשן (smoke test) הופכת את הסוויטה ממרוץ לביקורת (audit). היא עונה על השאלה שמהירות לבדה אינה יכולה לענות: האם ההתקנה באמת עובדת?

יושר רדיקלי כמאפיין

מחבר ה-canary הטמיע בתהליך שלוש חוקים שרוב מחברי הבנצ'מרקים מתייחסים אליהם כרשות.

מגרש משחקים שווה. נעשה שימוש ב-Flags כדי לנרמל התנהגות בין כלים שונים. אם מנהל חבילות מסוים מסתיר פגם בביצועים מאחורי הגדרה ברירת מחדל, הבנצ'מרק חושף אותו במקום לאפשר לכלי להיראות טוב במקרה.

Cold starts אמיתיים. לפני כל חזרה וחזרה, ולא רק הראשונה, ה-npm cache וה-pnpm store נמחקים. למילה "כל" הזו יש משקל רב. בנצ'מרקים רבים מנקים את ה-cache פעם אחת, ואז מריצים חמש התקנות ברצף. ההרצות השנייה עד החמישית אינן באמת "cold", והמספרים מתנפחים בהתאם. ה-canary מתחיל מאפס בכל פעם.

מצבי כשל גלויים. כאשר גרסה חדשה שוברת משהו, המאגר (repository) נשאר במצב כשל אדום. הוא נשאר שם בדף הבית, מכוער ולא פתור, עד שגרסה מתקנת יוצאת לאור. אין דיכוי שקט כדי לשמור על ה-dashboard נראה ירוק. מדיניות זו כופה שקיפות. משתמש שבוחן כלים יכול לראות לא רק מי הכי מהיר, אלא מי נשאר אמין לאורך זמן.

יכולת בדיקה היא תנאי סף

בנצ'מרק שאי אפשר לשחזר הוא בסך הכל סיסמת קמפיין. ה-canary נותן לכך מענה באמצעות סקריפט bash יחיד המאפשר לכל אחד להריץ כל חלק מהסוויטה באופן מקומי. אין צורך לסמוך על הרשת של ספק ענן או על סביבה שעברה כוונון ידני על ידי מנהל. אם אתם חושדים שהמספרים אינם מדויקים, אתם יכולים לייצר את שלכם.

השקיפות הזו גם הופכת את הפרויקט לשימושי עבור מנהלים (maintainers). כאשר מתרחשת רגרסיה, מפתח ב-downstream יכול למשוך את הסקריפט, לבצע bisect לגרסאות הכלי, ולהגיש לצוות ה-upstream...