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 | 56f30a96e9ce6035f8870faf12a13fe7b7f87d61 (patch) | |
| tree | fc47c347823e0494646e65f2cc786e676e28bf78 | |
| parent | ee14d15b0a4dc605cb41f7e2624a8de3904925d4 (diff) | |
| download | rabbitmq-server-git-56f30a96e9ce6035f8870faf12a13fe7b7f87d61.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 c8af20a28f..d055d84a7b 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)). |
