chanzuckerberg / redis-memo

A Redis-based version addressable caching system. Memoize pure functions, aggregated database queries, and 3rd party API calls.
https://rubygems.org/gems/redis-memo
MIT License
33 stars 3 forks source link

[change] Reduce logs volume #95

Closed donaldong closed 3 years ago

donaldong commented 3 years ago

Summary

Currently, we're printing way too many debug logs. Those logs are hardly useful to anyone unless they're developing redis-memo.

We can simply remove those Redis logs and display an overall query latency. Note the latency is an over-estmation. It includes more than just the time spent on the redis round trips

Screen Shot 2021-07-01 at 2 07 54 PM
codecov[bot] commented 3 years ago

Codecov Report

Merging #95 (7483830) into main (8e7d362) will decrease coverage by 0.03%. The diff coverage is 71.42%.

:exclamation: Current head 7483830 differs from pull request most recent head 66efc62. Consider uploading reports for the commit 66efc62 to get more accurate results Impacted file tree graph

@@            Coverage Diff             @@
##             main      #95      +/-   ##
==========================================
- Coverage   98.33%   98.29%   -0.04%     
==========================================
  Files          41       41              
  Lines        2577     2577              
==========================================
- Hits         2534     2533       -1     
- Misses         43       44       +1     
Impacted Files Coverage Δ
lib/redis_memo/redis.rb 92.30% <ø> (-0.72%) :arrow_down:
.../memoize_query/cached_select/connection_adapter.rb 90.47% <71.42%> (-3.65%) :arrow_down:

Continue to review full report at Codecov.

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

donaldong commented 3 years ago

add time elapsed

:mag_right: Click to see changes since last update.

donaldong commented 3 years ago

fix spec

:mag_right: Click to see changes since last update.

donaldong commented 3 years ago

adjust duration fp format

:mag_right: Click to see changes since last update.

donaldong commented 3 years ago

update

:mag_right: Click to see changes since last update.

donaldong commented 3 years ago

fix rubocop

:mag_right: Click to see changes since last update.