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

moonlibs / sync / 5209435547
97%

Build:
DEFAULT BRANCH: master
Ran 08 Jun 2023 09:08AM UTC
Jobs 1
Files 7
Run time 1s
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

pending completion
5209435547

push

github

web-flow
sync/rate: implements golang-like rate limiter (#7)

* sync/rate: implements golang-like rate limiter

	* sync/rate implements classic TokenBucket ratelimiter
	* client may create ratelimiter with passing limit and burst
	* rate limiter can have at most burst bucket
	* rate limiter is refilled with token at rate `limit` tokens per
	  second (can be fractional)
	* ratelimit exposes 3 public methods:
		- rate:wait([timeout=now, [n=1]]) awaits for n tokens
		  within timeout seconds (can be fractional)
		- rate:reserve([timestamp=now(), [n=1]]) creates
		  reservation for n tokens which will be consumed at
		  timestamp (non expired reservations can be cancelled)
		- rate:allow([timestamp=now(), [n=1]]) autoreserves n
		  token to be consumed at time `timestamp` (don't think
		  someone need this method at all)

* rate: adds README and tests

* rate: fixes namings and error format

---------

Co-authored-by: Vladislav Grubov <orangechaton@gmail.com>

508 of 526 relevant lines covered (96.58%)

15.62 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5209435547.1 08 Jun 2023 09:08AM UTC 7
96.58
GitHub Action Run
Source Files on build 5209435547
  • Tree
  • List 7
  • Changed 6
  • Source Changed 6
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 05a4778e on github
  • Prev Build on master (#4870217531)
  • Next Build on master (#6088159933)
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