summaryrefslogtreecommitdiff
path: root/src/couchdb/couch_stats_collector.erl
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2010-03-04 03:10:19 +0000
committerJohn Christopher Anderson <jchris@apache.org>2010-03-04 03:10:19 +0000
commitd318717866ffa267781ab482e99a05415e2ac0e4 (patch)
tree207409d78eacca8e206deb05b99689ec449722a4 /src/couchdb/couch_stats_collector.erl
parent3a3a9c1efab1c9fe4cd5ebb6c80da4005eb0806b (diff)
reverting damien's latest commit until we can figure out why it's causing failures
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@918834 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_stats_collector.erl')
-rw-r--r--src/couchdb/couch_stats_collector.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/couchdb/couch_stats_collector.erl b/src/couchdb/couch_stats_collector.erl
index f7b9bb48..59d62a6e 100644
--- a/src/couchdb/couch_stats_collector.erl
+++ b/src/couchdb/couch_stats_collector.erl
@@ -60,7 +60,7 @@ increment(Key) ->
Key2 = make_key(Key),
case catch ets:update_counter(?HIT_TABLE, Key2, 1) of
{'EXIT', {badarg, _}} ->
- catch ets:insert(?HIT_TABLE, {Key2, 1}),
+ true = ets:insert(?HIT_TABLE, {Key2, 1}),
ok;
_ ->
ok
@@ -70,16 +70,16 @@ decrement(Key) ->
Key2 = make_key(Key),
case catch ets:update_counter(?HIT_TABLE, Key2, -1) of
{'EXIT', {badarg, _}} ->
- catch ets:insert(?HIT_TABLE, {Key2, -1}),
+ true = ets:insert(?HIT_TABLE, {Key2, -1}),
ok;
_ -> ok
end.
record(Key, Value) ->
- catch ets:insert(?ABS_TABLE, {make_key(Key), Value}).
+ true = ets:insert(?ABS_TABLE, {make_key(Key), Value}).
clear(Key) ->
- catch ets:delete(?ABS_TABLE, make_key(Key)).
+ true = ets:delete(?ABS_TABLE, make_key(Key)).
track_process_count(Stat) ->
track_process_count(self(), Stat).