Skip to content

Conversation

davidor
Copy link
Contributor

@davidor davidor commented Mar 4, 2019

I saw #9 and thought that it would be interesting to add redis-rb with Hiredis to the bechmarks. https://github.com/redis/redis-rb#hiredis

Hiredis is implemented in C so the comparison is not entirely fair, but I think it's useful to know how it performs.

Results on my local machine:

Client Performance                                                                                                                                                              
Warming up --------------------------------------                                                                                                                               
 async-redis (pool)   780.000  i/100ms                                                                                                                                         
 async-redis (nested)   797.000  i/100ms                                                                                                                                         
 redis-rb     1.062k i/100ms                                                                                                                                         
 redis-rb (hiredis)     1.472k i/100ms                                                                                                                                         
Calculating -------------------------------------                                                                                                                               
  async-redis (pool)      8.222k (±10.0%) i/s -     41.340k in   5.077386s                                                                                                      
  async-redis (nested)      9.353k (± 9.6%) i/s -     47.023k in   5.073603s                                                                                                      
  redis-rb     10.760k (± 9.5%) i/s -     54.162k in   5.078243s                                                                                                      
  redis-rb (hiredis)     14.904k (± 5.9%) i/s -     75.072k in   5.054911s                                                                                                      
                                                                                                                                                                                
Comparison:                                                                                                                                                                     
  redis-rb (hiredis):    14903.9 i/s                                                                                                                                            
  redis-rb:    10759.8 i/s - 1.39x  slower                                                                                                                            
  async-redis (nested):     9353.0 i/s - 1.59x  slower                                                                                                                            
  async-redis (pool):     8221.5 i/s - 1.81x  slower   

I think that in the future we could add more redis commands. We could select the commands to test based on what the redis-benchmark tool tests: https://redis.io/topics/benchmarks

@coveralls
Copy link

coveralls commented Mar 4, 2019

Pull Request Test Coverage Report for Build 94

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 86.548%

Totals Coverage Status
Change from base Build 90: 0.0%
Covered Lines: 341
Relevant Lines: 394

💛 - Coveralls

@davidor
Copy link
Contributor Author

davidor commented Mar 4, 2019

I noticed that Travis also runs the tests on TruffleRuby and JRuby. Those fail because they do not support C extensions.

I'll try to provide a fix for that tomorrow.

@ioquatix
Copy link
Member

ioquatix commented Mar 4, 2019

Okay, once you fix the test failures we can merge.

@davidor davidor force-pushed the add-redis-rb-hiredis-to-benchmarks branch 2 times, most recently from 7040324 to c91811f Compare March 5, 2019 19:16
@davidor davidor force-pushed the add-redis-rb-hiredis-to-benchmarks branch from c91811f to a8b8295 Compare March 5, 2019 19:32
@davidor
Copy link
Contributor Author

davidor commented Mar 5, 2019

I think that the issue should be fixed.

I see that JRuby tests are still failing but it's because of #13 . TruffleRuby is failing as well, but it looks like it's not because of something introduced in this PR, because my other PR fails too in TruffleRuby #14 with the same error.

@ioquatix ioquatix merged commit 37eeed8 into socketry:master Mar 5, 2019
@ioquatix
Copy link
Member

ioquatix commented Mar 5, 2019

Okay let's see how it goes.

@davidor davidor deleted the add-redis-rb-hiredis-to-benchmarks branch March 5, 2019 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants