deis / logger

In-memory log buffer used by Deis Workflow.
https://deis.com
MIT License
18 stars 15 forks source link

Optimize redis storage adapter and make default #100

Closed krancour closed 8 years ago

krancour commented 8 years ago

This is my first pass at optimizing the logger's use of Redis. It reduces ops required by using larger pipelines capped with whatever ltrims are needed (one per app) instead of smaller pipelines that contain only one rpush and one ltrim.

This is mostly just for @arschles to review and propose improvements.

This PR includes the following:

deis-bot commented 8 years ago

@arschles is a potential reviewer of this pull request based on my analysis of git blame information. Thanks @krancour!

codecov-io commented 8 years ago

Current coverage is 41.12%

Merging #100 into master will decrease coverage by 7.20%

@@             master       #100   diff @@
==========================================
  Files            10         10          
  Lines           269        321    +52   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits            130        132     +2   
- Misses          119        169    +50   
  Partials         20         20          

Powered by Codecov. Last updated by dcd4077...89a1585

krancour commented 8 years ago

As stated in slack, one improvement I feel I can make here is by encapsulating more of the "message queue" state and logic in its own type. Consider that my next improvement. So I need feedback on the strategy more so than the structure of the code. (Although feedback on both is welcome, of course.)

jchauncey commented 8 years ago

Made 2 comments but you can submit those in another PR.