Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
more efficient decrement
  • Loading branch information
joewilliams committed Apr 26, 2012
1 parent 986523f commit a45f876
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/folsom_metrics_counter.erl
Expand Up @@ -48,7 +48,7 @@ dec(Name) ->
ets:update_counter(?COUNTER_TABLE, Name, -1). ets:update_counter(?COUNTER_TABLE, Name, -1).


dec(Name, Value) -> dec(Name, Value) ->
ets:update_counter(?COUNTER_TABLE, Name, Value * -1). ets:update_counter(?COUNTER_TABLE, Name, -Value).


get_value(Name) -> get_value(Name) ->
[{_, Values}] = ets:lookup(?COUNTER_TABLE, Name), [{_, Values}] = ets:lookup(?COUNTER_TABLE, Name),
Expand Down

0 comments on commit a45f876

Please sign in to comment.