diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2014-11-06 13:51:48 +0000 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2014-11-06 13:51:48 +0000 |
commit | 5957db9e3d058335f70d0c80acf8e28f14176bfc (patch) | |
tree | fc47c347823e0494646e65f2cc786e676e28bf78 | |
parent | 28274a6f2ed0a6b0a26e9ea0a80ef3a16e98274b (diff) | |
download | rabbitmq-server-5957db9e3d058335f70d0c80acf8e28f14176bfc.tar.gz |
Move this formatting up to the agent.
-rw-r--r-- | src/file_handle_cache_stats.erl | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/file_handle_cache_stats.erl b/src/file_handle_cache_stats.erl index c8af20a2..d055d84a 100644 --- a/src/file_handle_cache_stats.erl +++ b/src/file_handle_cache_stats.erl @@ -21,7 +21,6 @@ -export([init/0, update/3, update/2, get/0]). -define(TABLE, ?MODULE). --define(MICRO_TO_MILLI, 1000). init() -> ets:new(?TABLE, [public, named_table]), @@ -44,10 +43,4 @@ update(Op, Thunk) -> Res. get() -> - lists:sort([output(K, V) || {K, V} <- ets:tab2list(?TABLE)]). - -output({Op, time}, Val) -> {flatten_key(Op, time), Val / ?MICRO_TO_MILLI}; -output({Op, Ctr}, Val) -> {flatten_key(Op, Ctr), Val}. - -flatten_key(A, B) -> - list_to_atom("fhc_" ++ atom_to_list(A) ++ "_" ++ atom_to_list(B)). + lists:sort(ets:tab2list(?TABLE)). |