Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/camshaft/count_buffer
- Owner: camshaft
- Created: 2015-06-10T06:09:52.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-08T02:13:21.000Z (about 9 years ago)
- Last Synced: 2024-10-11T19:48:48.665Z (4 months ago)
- Language: Elixir
- Size: 7.81 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- freaking_awesome_elixir - Elixir - Buffer a large set of counters and flush periodically. (Algorithms and Data structures)
- fucking-awesome-elixir - count_buffer - Buffer a large set of counters and flush periodically. (Algorithms and Data structures)
- awesome-elixir - count_buffer - Buffer a large set of counters and flush periodically. (Algorithms and Data structures)
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)
```