Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade go-redis #41

Merged
merged 2 commits into from
Jan 24, 2024
Merged

Upgrade go-redis #41

merged 2 commits into from
Jan 24, 2024

Conversation

yosiat
Copy link
Contributor

@yosiat yosiat commented Jan 23, 2024

Comparing to master:

name                        old time/op    new time/op    delta
_CloudflareAlgorithm-10       30.4µs ± 1%    28.4µs ± 1%   -6.44%  (p=0.008 n=5+5)
_GcraAlgorithm-10             34.3µs ± 1%    31.6µs ± 0%   -7.66%  (p=0.008 n=5+5)
_SlidingWindowAlgorithm-10    36.0µs ± 1%    33.0µs ± 2%   -8.15%  (p=0.008 n=5+5)

name                        old alloc/op   new alloc/op   delta
_CloudflareAlgorithm-10       1.35kB ± 1%    1.29kB ± 0%   -4.06%  (p=0.016 n=5+4)
_GcraAlgorithm-10               806B ± 0%      831B ± 0%   +3.10%  (p=0.016 n=5+4)
_SlidingWindowAlgorithm-10      616B ± 0%      640B ± 0%   +3.90%  (p=0.008 n=5+5)

name                        old allocs/op  new allocs/op  delta
_CloudflareAlgorithm-10         37.0 ± 0%      37.0 ± 0%     ~     (all equal)
_GcraAlgorithm-10               22.0 ± 0%      26.0 ± 0%  +18.18%  (p=0.008 n=5+5)
_SlidingWindowAlgorithm-10      17.0 ± 0%      21.0 ± 0%  +23.53%  (p=0.008 n=5+5)

Moving to MGET instead of pipeline for cloudflare:

name                        old time/op    new time/op    delta
_CloudflareAlgorithm-10       30.4µs ± 1%    26.4µs ± 0%  -13.05%  (p=0.008 n=5+5)
_GcraAlgorithm-10             34.3µs ± 1%    31.4µs ± 1%   -8.37%  (p=0.008 n=5+5)
_SlidingWindowAlgorithm-10    36.0µs ± 1%    32.9µs ± 1%   -8.47%  (p=0.008 n=5+5)

name                        old alloc/op   new alloc/op   delta
_CloudflareAlgorithm-10       1.35kB ± 1%    0.82kB ± 1%  -39.32%  (p=0.008 n=5+5)
_GcraAlgorithm-10               806B ± 0%      831B ± 0%   +3.05%  (p=0.008 n=5+5)
_SlidingWindowAlgorithm-10      616B ± 0%      640B ± 0%   +3.90%  (p=0.008 n=5+5)

name                        old allocs/op  new allocs/op  delta
_CloudflareAlgorithm-10         37.0 ± 0%      25.0 ± 0%  -32.43%  (p=0.008 n=5+5)
_GcraAlgorithm-10               22.0 ± 0%      26.0 ± 0%  +18.18%  (p=0.008 n=5+5)
_SlidingWindowAlgorithm-10      17.0 ± 0%      21.0 ± 0%  +23.53%  (p=0.008 n=5+5)

Copy link

codecov bot commented Jan 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5057eb8) 73.52% compared to head (47fa409) 73.52%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #41   +/-   ##
=======================================
  Coverage   73.52%   73.52%           
=======================================
  Files           2        2           
  Lines          34       34           
=======================================
  Hits           25       25           
  Misses          7        7           
  Partials        2        2           
Files Coverage Δ
limiter.go 73.07% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 36d86bf...47fa409. Read the comment docs.

@yosiat yosiat force-pushed the up-go-redis branch 2 times, most recently from 0fa686a to 70fe11d Compare January 23, 2024 16:50
```
name                        old time/op    new time/op    delta
_CloudflareAlgorithm-10       28.4µs ± 1%    26.4µs ± 0%   -7.07%  (p=0.008 n=5+5)
_GcraAlgorithm-10             31.6µs ± 0%    31.4µs ± 1%   -0.76%  (p=0.032 n=5+5)
_SlidingWindowAlgorithm-10    33.0µs ± 2%    32.9µs ± 1%     ~     (p=1.000 n=5+5)

name                        old alloc/op   new alloc/op   delta
_CloudflareAlgorithm-10       1.29kB ± 0%    0.82kB ± 1%  -36.75%  (p=0.000 n=4+5)
_GcraAlgorithm-10               831B ± 0%      831B ± 0%     ~     (p=0.333 n=4+5)
_SlidingWindowAlgorithm-10      640B ± 0%      640B ± 0%     ~     (all equal)

name                        old allocs/op  new allocs/op  delta
_CloudflareAlgorithm-10         37.0 ± 0%      25.0 ± 0%  -32.43%  (p=0.008 n=5+5)
_GcraAlgorithm-10               26.0 ± 0%      26.0 ± 0%     ~     (all equal)
_SlidingWindowAlgorithm-10      21.0 ± 0%      21.0 ± 0%     ~     (all equal)
```
@yosiat yosiat marked this pull request as ready for review January 23, 2024 19:53
@yosiat yosiat requested a review from a team as a code owner January 23, 2024 19:53
Comment on lines +37 to +38
EvalRO(ctx context.Context, script string, keys []string, args ...interface{}) *redis.Cmd
EvalShaRO(ctx context.Context, sha1 string, keys []string, args ...interface{}) *redis.Cmd
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those are new?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, needed for upgraded packages.

@shamil shamil assigned yosiat and unassigned shamil Jan 24, 2024
@yosiat yosiat merged commit 21130cb into master Jan 24, 2024
3 checks passed
@yosiat yosiat deleted the up-go-redis branch January 24, 2024 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants