diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2010-07-15 14:56:41 +0100 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2010-07-15 14:56:41 +0100 |
| commit | 4691226a5b4997acbe1d83ffdb9b2dd3af47f7ee (patch) | |
| tree | d3b1ecd20857e8eab1ed9421f1ee02df8ee4d12e | |
| parent | aec3a8b2ea3de0aaa94eb83e29c05cd7dce611cd (diff) | |
| download | rabbitmq-server-git-4691226a5b4997acbe1d83ffdb9b2dd3af47f7ee.tar.gz | |
another place were averages could end up being integers instead of floats
| -rw-r--r-- | src/rabbit_variable_queue.erl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/rabbit_variable_queue.erl b/src/rabbit_variable_queue.erl index 89ba342de5..f32c98ba2a 100644 --- a/src/rabbit_variable_queue.erl +++ b/src/rabbit_variable_queue.erl @@ -816,9 +816,8 @@ beta_fold(Fun, Init, Q) -> bpqueue:foldr(fun (_Prefix, Value, Acc) -> Fun(Value, Acc) end, Init, Q). update_rate(Now, Then, Count, {OThen, OCount}) -> - %% form the avg over the current period and the previous - Avg = 1000000 * ((Count + OCount) / timer:now_diff(Now, OThen)), - {Avg, {Then, Count}}. + %% avg over the current period and the previous + {1000000.0 * (Count + OCount) / timer:now_diff(Now, OThen), {Then, Count}}. %%---------------------------------------------------------------------------- %% Internal major helpers for Public API |
