Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/camshaft/count_buffer

buffer a large set of counters and flush periodically
https://github.com/camshaft/count_buffer

Last synced: about 1 month ago
JSON representation

buffer a large set of counters and flush periodically

Awesome Lists containing this project

README

        

count_buffer
===========

buffer a large set of counters and flush periodically.

## api

```elixir
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)
```