getconversio / redis-metrics

Easy metric tracking and aggregation using Redis
http://getconversio.github.io/redis-metrics/
MIT License
28 stars 8 forks source link

Add function for removing counter event objects #18

Closed dlebech closed 7 years ago

dlebech commented 7 years ago

This PR adds a utility function to the timestamped counter that can trim the set of event objects stored for the counter. This is useful if the number of event objects have gotten very large, but it is not generally a good idea to use the function very often, because it naively trims values without considering the impact to reporting.

codecov-io commented 7 years ago

Codecov Report

Merging #18 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #18   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           5      5           
  Lines         232    267   +35     
  Branches       55     64    +9     
=====================================
+ Hits          232    267   +35
Impacted Files Coverage Δ
lib/counter.js 100% <100%> (ø) :arrow_up:

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 993a297...d8ebcb3. Read the comment docs.