How to do counters?

Jarrod Roberson jarrod@REDACTED
Wed Jun 10 19:21:20 CEST 2009

I want to add counters to my gen_tcp implementation to track total
number of connections made, total number of requests serviced, total
number of bytes transfered, etc.
I need to have numbers like this for production monitoring. In python
or java I would just have a singleton class that had these counters
with thread safe increment/decrement methods. How would I get this
same behavior using Erlang?

More information about the erlang-questions mailing list