• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Kikobeats / debug-logfmt / 40658032740
97%

Build:
DEFAULT BRANCH: master
Ran 28 Oct 2026 08:37AM UTC
Jobs 1
Files 3
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 Oct 2026 08:36AM UTC coverage: 97.159% (+4.2%) from 92.958%
40658032740

push

github

web-flow
perf(logger): cache the enabled check until namespaces change (#25)

* perf(duration): return a shared no-op when every level is disabled

duration() allocated three closures per call and read the `enabled`
getter of debug instances, which are dictionary-mode functions whose
accessors V8 does not inline. When the root, error and info namespaces
are all disabled it now returns one shared function, and the disabled
state is cached until debug.enable() changes debug.namespaces (the key
debug >= 4.3.1 uses for its own cache). Older debug versions and custom
levels without error/info keep the previous path.

duration disabled (2M duration()() calls): 116.4ms -> 13.8ms (-88.1%),
median of 7 alternating runs per side, ranges 115.2-117.7 vs 12.6-16.3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* perf(logger): cache the enabled check until namespaces change

Every log call read debug's `enabled` accessor before returning, and
that accessor lives on a dictionary-mode function V8 does not inline.
The logger now reuses the namespaces-keyed cache from duration(), so a
disabled call costs one property read. The rest-args array before the
check costs nothing measurable (V8 elides it).

call disabled (5M calls): 49.2ms -> 17.4ms (-64.6%), median of 7
alternating runs per side vs the previous commit, ranges 48.3-51.3 vs
16.8-19.4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(duration): check enabled when the timer runs

A shared no-op dropped the line when enable() ran after duration()
and before the call, and a property set on it showed up on every
logger. Call-time checks stay, and the namespaces cache still keeps
a disabled log off debug's getter.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

52 of 54 branches covered (96.3%)

Branch coverage included in aggregate %.

20 of 20 new or added lines in 1 file covered. (100.0%)

119 of 122 relevant lines covered (97.54%)

28.55 hits per line

Jobs
ID Job ID Ran Files Coverage
1 40658032740.1 28 Oct 2026 08:37AM UTC 3
97.16
GitHub Action Run
Source Files on build 40658032740
  • Tree
  • List 3
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #40658032740
  • cb8f8597 on github
  • Prev Build on master (#40650144159)
  • Next Build on master (#40670779669)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc