diff options
author | Adam Kocoloski <kocolosk@apache.org> | 2009-04-04 21:47:12 +0000 |
---|---|---|
committer | Adam Kocoloski <kocolosk@apache.org> | 2009-04-04 21:47:12 +0000 |
commit | 05838650cfd06fa27f07d0a13b80617879b381e3 (patch) | |
tree | 44ae7e7f394ae3ca9243e10b673039c8ff4943c6 /src/couchdb | |
parent | 3238c8bf3f8734ad783528d461545b80a40f3e1e (diff) |
Use now_diff instead of statistics(runtime). Closes COUCHDB-316
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@762019 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb')
-rw-r--r-- | src/couchdb/couch_httpd.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/couchdb/couch_httpd.erl b/src/couchdb/couch_httpd.erl index 4acc3d44..aa78ebb2 100644 --- a/src/couchdb/couch_httpd.erl +++ b/src/couchdb/couch_httpd.erl @@ -109,7 +109,7 @@ stop() -> handle_request(MochiReq, UrlHandlers, DbUrlHandlers, DesignUrlHandlers) -> - statistics(runtime), % prepare request_time counter, see end of function + Begin = now(), AuthenticationFun = make_arity_1_fun( couch_config:get("httpd", "authentication_handler")), % for the path, use the raw path with the query string and fragment @@ -180,7 +180,7 @@ handle_request(MochiReq, UrlHandlers, DbUrlHandlers, DesignUrlHandlers) -> RawUri, Resp:get(code) ]), - {_TotalRuntime, RequestTime} = statistics(runtime), + RequestTime = round(timer:now_diff(now(), Begin)/1000), couch_stats_collector:record({couchdb, request_time}, RequestTime), couch_stats_collector:increment({httpd, requests}), {ok, Resp}. |