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

Kikobeats / ua-hints
100%

Build:
DEFAULT BRANCH: master
Repo Added 27 Apr 2025 05:55PM UTC
Token z31cxax1b3Q72bSYZqQAQRKGtXfCpyPOh regen
Build 38 Last
Files 1
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

LAST BUILD ON BRANCH master
branch: SELECT
CHANGE BRANCH
x
Sync Branches
  • No branch selected
  • Kikobeats/benchmark-baseline
  • Kikobeats/perf-ua-cache
  • cursor/critical-bug-management-0559
  • cursor/critical-bug-management-2a42
  • cursor/critical-bug-management-2d5c
  • cursor/critical-bug-management-2e89
  • cursor/critical-bug-management-7403
  • cursor/critical-bug-management-b3ad
  • cursor/critical-bug-management-d9a9
  • cursor/critical-bug-management-e596
  • cursor/critical-bug-management-ebc6
  • cursor/critical-bug-management-f8c7
  • cursor/no-hints-for-safari-firefox-3b3d
  • dependabot/github_actions/actions/checkout-5
  • dependabot/github_actions/pnpm/action-setup-6
  • dependabot/github_actions/pnpm/action-setup-6.0.9
  • fix/chromium-client-hints-fidelity
  • master

27 Oct 2026 10:17PM UTC coverage: 100.0%. Remained the same
40593647985

push

github

web-flow
perf: cache hints per user agent in a bounded LRU (#24)

* perf: cache hints per user agent in a bounded LRU

Parsing dominates every call: ua-parser-js runs four getters, each
allocating a UAItem and walking its regex map (createIData + setProps +
regexes were ~70% of self time). Callers pass the same few user agents
over and over, so the parsed hints are now kept in a Map capped at 1000
entries (least recently used evicted) and a shallow copy is returned, so
callers can still mutate what they get back.

A/B, node benchmark/index.js, 5 alternating runs per side, median of
medians (node 24.16.0, arm64, load avg 7.5):

| case | base | head | delta |
|---|---|---|---|
| hints top 100 user agents | 99.6 ms | 0.4 ms | -99.6% |
| hints single user agent repeated | 128.4 ms | 1.4 ms | -98.9% |

All-miss path (20k distinct UAs): 564 ms -> 573 ms (+1.5%).

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

* test: lock hint-cache hits, eviction, and recency

Output checks stay green if a repeat parse, a dropped eviction, or a
stale recency update slips in. Count parser constructions so those
branches fail, and treat a cached empty object as a hit.

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

---------

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

61 of 61 branches covered (100.0%)

Branch coverage included in aggregate %.

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

188 of 188 relevant lines covered (100.0%)

507.51 hits per line

Relevant lines Covered
Build:
Build:
188 RELEVANT LINES 188 COVERED LINES
507.51 HITS PER LINE
Source Files on master
  • Tree
  • List 1
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
40593647985 master perf: cache hints per user agent in a bounded LRU (#24) * perf: cache hints per user agent in a bounded LRU Parsing dominates every call: ua-parser-js runs four getters, each allocating a UAItem and walking its regex map (createIData + setProps ... push 27 Oct 2026 10:17PM UTC web-flow github
100.0
40590384650 Kikobeats/perf-ua-cache Merge f3df025f3 into 290ab1651 Pull #24 27 Oct 2026 09:53PM UTC web-flow github
100.0
40568967457 Kikobeats/perf-ua-cache Merge bd34036de into 290ab1651 Pull #24 27 Oct 2026 07:25PM UTC web-flow github
99.59
40560618908 Kikobeats/benchmark-baseline Merge aa21e5a22 into 6f350c163 Pull #23 27 Oct 2026 06:30PM UTC web-flow github
100.0
40557870158 Kikobeats/benchmark-baseline Merge aa4b77d54 into 6f350c163 Pull #23 27 Oct 2026 06:13PM UTC web-flow github
100.0
38361298437 master fix: clamp non-finite GREASE seeds so overflow UA versions do not crash (#22) * fix: clamp non-finite GREASE seeds so overflow UA versions do not crash parseInt of a 310+ digit Chromium/browser major is Infinity. Infinity % n is NaN, so BRAND_OR... push 13 Oct 2026 07:13AM UTC web-flow github
100.0
38360781286 cursor/critical-bug-management-f8c7 Merge 5713c8388 into d5ff216b6 Pull #22 13 Oct 2026 07:08AM UTC web-flow github
100.0
38023100084 cursor/critical-bug-management-f8c7 Merge ab4ad8267 into d5ff216b6 Pull #22 10 Oct 2026 04:10AM UTC web-flow github
100.0
37956320834 master fix: clamp GREASE seed so negative UA versions do not crash (#21) * fix: clamp GREASE seed so negative UA versions do not crash ua-parser-js reports brands such as Vivaldi/-1 with an empty engine. parseInt of that version is a truthy negative, s... push 09 Oct 2026 04:04PM UTC web-flow github
99.55
37955312633 cursor/critical-bug-management-d9a9 Merge 76a819e36 into 02e6d043a Pull #21 09 Oct 2026 03:55PM UTC web-flow github
99.55
See All Builds (38)

Badge your Repo: ua-hints

We detected this repo isn’t badged! Grab the embed code to the right, add it to your repo to show off your code coverage, and when the badge is live hit the refresh button to remove this message.

Could not find badge in README.

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

Refresh
  • Settings
  • Repo on GitHub
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