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

uber / cadence / 018fa25a-37ac-4e2f-9de0-0090786e76c2
72%

Build:
DEFAULT BRANCH: master
Ran 22 May 2024 10:43PM UTC
Jobs 1
Files 714
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

22 May 2024 10:09PM UTC coverage: 69.264% (+0.009%) from 69.255%
018fa25a-37ac-4e2f-9de0-0090786e76c2

push

buildkite

web-flow
Global ratelimiter helper: a small atomic-like map (#6027)

This commit largely exists to break this out for separate review, as it's relatively simple and isolated.

In a later PR, this will be used by the "limiter"-side logic to hold known ratelimiters, and simplify its logic.  So it does just two core things, and exposes a *very* small API that's intended to be difficult or impossible to misuse:

1. Tracks length, so a "iterate over everything and collect data for sending to aggregators" loop can pre-allocate a collection that is likely large enough to store everything.
2. Implicitly initializes missing values, so the using logic does not ever need to check for existence or explicitly handle fallbacks or decide how to order atomic operations.

It could have other methods, but so far they do not seem necessary.  Delete is not currently planned to be used, but it seems important to reserve / guarantee it's possible to build, so I've included that as well.

---

This is not intended to be broadly reusable as we do not currently have any other locations that will use it, and the auto-initializing behavior is potentially unique.  It's mostly just isolating and simplifying some logic to prevent accidental misuse, because early iterations had some easily-missed flaws.

We very likely *should* have a "just a type-safe `sync.Map`" wrapper, which this could easily be changed to use, but the vast majority of that API would be unused here so I haven't built that.

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

32 existing lines in 12 files now uncovered.

102051 of 147336 relevant lines covered (69.26%)

2568.77 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
2
86.63
0.0% service/history/task/transfer_standby_task_executor.go
2
88.06
-1.0% common/task/weighted_round_robin_task_scheduler.go
2
73.23
-1.57% service/matching/tasklist/db.go
2
81.58
-1.32% common/peerprovider/ringpopprovider/config.go
2
81.25
-0.43% service/history/replication/task_processor.go
2
72.72
-0.13% service/history/task/transfer_active_task_executor.go
2
84.69
-0.96% common/membership/hashring.go
2
66.67
-0.5% common/persistence/historyManager.go
3
50.46
-0.55% common/log/tag/tags.go
3
85.57
0.52% service/history/task/fetcher.go
5
61.95
-1.68% common/persistence/nosql/nosql_task_store.go
5
75.6
-1.33% service/matching/tasklist/task_reader.go
Jobs
ID Job ID Ran Files Coverage
1 018fa25a-37ac-4e2f-9de0-0090786e76c2.1 22 May 2024 10:43PM UTC 714
69.26
Source Files on build 018fa25a-37ac-4e2f-9de0-0090786e76c2
  • Tree
  • List 714
  • Changed 308
  • Source Changed 0
  • Coverage Changed 21
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 144a627e on github
  • Prev Build on master (#018FA0F0...)
  • Next Build on master (#018FA464...)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc