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

moonlibs / sync
97%
master: 97%

Build:
Build:
LAST BUILD BRANCH: refs/tags/0.12.0
DEFAULT BRANCH: master
Repo Added 27 Apr 2023 08:06PM UTC
Files 7
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 refs/tags/0.11.0
branch: refs/tags/0.11.0
CHANGE BRANCH
x
Reset
  • refs/tags/0.11.0
  • 4-syncpool-failed-at-terminating
  • feat/ratelimit
  • fix-infinite-rate
  • fix-readme
  • fix-timeout-0
  • master
  • refs/pull/5/merge
  • refs/pull/6/merge
  • refs/pull/7/merge
  • refs/pull/8/merge
  • refs/pull/9/merge
  • refs/tags/0.10.1
  • refs/tags/0.10.2
  • refs/tags/0.11.1
  • refs/tags/0.12.0

pending completion
5209733927

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

Relevant lines Covered
Build:
Build:
526 RELEVANT LINES 508 COVERED LINES
15.62 HITS PER LINE
Source Files on refs/tags/0.11.0
  • Tree
  • List 7
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
5209733927 refs/tags/0.11.0 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 ha... push 08 Jun 2023 09:40AM UTC web-flow github pending completion  
See All Builds (34)
  • Repo on GitHub
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

© 2025 Coveralls, Inc