diff options
author | Jan Lehnardt <jan@apache.org> | 2009-02-27 16:44:53 +0000 |
---|---|---|
committer | Jan Lehnardt <jan@apache.org> | 2009-02-27 16:44:53 +0000 |
commit | 894b8a95e88c786f2c03eb6db4d44b9212646113 (patch) | |
tree | 69003f75d527be55d0cf6e385626d1eed9cdb734 /src/couchdb/couch_httpd.erl | |
parent | 7c4f823f77d129d6fa3de038e17ec119734c0ed0 (diff) |
- group HTTP method stats into httpd_requests_methods as per Christopher Lenz's suggestion
- renamed http_status_codes to httpd_status_codes
- better internal variable naming
- remove comments that were leftovers from earlier refactoring
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@748582 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_httpd.erl')
-rw-r--r-- | src/couchdb/couch_httpd.erl | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/couchdb/couch_httpd.erl b/src/couchdb/couch_httpd.erl index 3365e88c..b8b80489 100644 --- a/src/couchdb/couch_httpd.erl +++ b/src/couchdb/couch_httpd.erl @@ -176,8 +176,7 @@ handle_request(MochiReq, UrlHandlers, DbUrlHandlers) -> {ok, Resp}. increment_method_stats(Method) -> - CounterName = list_to_atom(string:to_lower(atom_to_list(Method)) ++ "_requests"), - couch_stats_collector:increment({httpd, CounterName}). + couch_stats_collector:increment({httpd_request_methods, Method}). special_test_authentication_handler(Req) -> case header_value(Req, "WWW-Authenticate") of @@ -338,7 +337,7 @@ basic_username_pw(Req) -> start_chunked_response(#httpd{mochi_req=MochiReq}, Code, Headers) -> - couch_stats_collector:increment({http_status_codes, Code}), + couch_stats_collector:increment({httpd_status_codes, Code}), {ok, MochiReq:respond({Code, Headers ++ server_header(), chunked})}. send_chunk(Resp, Data) -> @@ -346,7 +345,7 @@ send_chunk(Resp, Data) -> {ok, Resp}. send_response(#httpd{mochi_req=MochiReq}, Code, Headers, Body) -> - couch_stats_collector:increment({http_status_codes, Code}), + couch_stats_collector:increment({httpd_status_codes, Code}), if Code >= 400 -> ?LOG_DEBUG("HTTPd ~p error response:~n ~s", [Code, Body]); true -> ok |