mennanov / limiters

Golang rate limiters for distributed applications
https://godoc.org/github.com/mennanov/limiters
MIT License
458 stars 49 forks source link

add LockPostgreSQL and BenchmarkDistLockers #38

Closed leeym closed 7 months ago

leeym commented 7 months ago

Add the following two

goos: darwin
goarch: amd64
pkg: github.com/mennanov/limiters
cpu: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
BenchmarkDistLockers
2024/03/15 12:55:40 Connected to 127.0.0.1:2181
2024/03/15 12:55:40 authenticated: id=72058590880071686, timeout=4000
2024/03/15 12:55:40 re-submitting `0` credentials after reconnect
BenchmarkDistLockers/LockPostgreSQL
BenchmarkDistLockers/LockPostgreSQL-12               626           1616118 ns/op
BenchmarkDistLockers/LockEtcd
BenchmarkDistLockers/LockEtcd-12                     177           6754712 ns/op
BenchmarkDistLockers/LockConsul
BenchmarkDistLockers/LockConsul-12                   121           9367934 ns/op
BenchmarkDistLockers/LockZookeeper
BenchmarkDistLockers/LockZookeeper-12                288           4256412 ns/op
BenchmarkDistLockers/LockRedis
BenchmarkDistLockers/LockRedis-12                   1292            928732 ns/op
BenchmarkDistLockers/LockMemcached
BenchmarkDistLockers/LockMemcached-12                716           1639791 ns/op
PASS
ok      github.com/mennanov/limiters    266.516s

It will be easier to review in unified view and hide whitespace.

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 80.01%. Comparing base (c1474e1) to head (1cb64ea).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #38 +/- ## ========================================== + Coverage 79.90% 80.01% +0.11% ========================================== Files 12 12 Lines 1438 1446 +8 ========================================== + Hits 1149 1157 +8 Misses 212 212 Partials 77 77 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

leeym commented 7 months ago

It is flaky and doesn't work as expected.