basho/riak_core — pull request #194 by russelldb (2012-06-20 17:06:53+00:00)
Title: Cache stats in ets, only allow one call to Mod:get_stats at a time.

Moving to folsom and removing the bottle necky gen_servers for stats means that many concurrent calls to calculate stats are no longer serialized. This PR provides a cache that also ensures only a single call to calculate stats executes at a time. Requests that arrive while stats are being calculated will be notified with the currently executing calls results, rather than calling the calculate code again.

Also, have riak_core_stat spawn calls to folsom.