Skip to content
buffer a large set of counters and flush periodically
Elixir
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
bench
lib
test
.gitignore
README.md
mix.exs

README.md

count_buffer

buffer a large set of counters and flush periodically.

api

name = :my_counters
size = 128
flush = fn(bucket, key, count) ->
  ## persist your counts here
end
CountBuffer.start(name, size, flush)

bucket = "page_views"
key = "index.html"

CountBuffer.increment(name, bucket, key)
CountBuffer.increment(name, bucket, key, 10)
Something went wrong with that request. Please try again.