You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2015/08/28 00:08:13 UTC
couch commit: updated refs/heads/master to 0fdc50b
Repository: couchdb-couch
Updated Branches:
refs/heads/master f6b69a925 -> 0fdc50bf3
Capture histogram data for _bulk_requests
COUCHDB-2792
Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch/commit/0fdc50bf
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch/tree/0fdc50bf
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch/diff/0fdc50bf
Branch: refs/heads/master
Commit: 0fdc50bf3e237c5b4f1f331e7063f44ce1cdf2aa
Parents: f6b69a9
Author: Robert Newson <rn...@apache.org>
Authored: Thu Aug 27 21:22:17 2015 +0100
Committer: Robert Newson <rn...@apache.org>
Committed: Thu Aug 27 22:20:54 2015 +0100
----------------------------------------------------------------------
priv/stats_descriptions.cfg | 4 ++++
src/couch_httpd_db.erl | 1 +
2 files changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/0fdc50bf/priv/stats_descriptions.cfg
----------------------------------------------------------------------
diff --git a/priv/stats_descriptions.cfg b/priv/stats_descriptions.cfg
index 4410590..c695ae4 100644
--- a/priv/stats_descriptions.cfg
+++ b/priv/stats_descriptions.cfg
@@ -50,6 +50,10 @@
{type, counter},
{desc, <<"number of _local document write operations">>}
]}.
+{[couchdb, httpd, bulk_docs], [
+ {type, histogram},
+ {desc, <<"distribution of the number of docs in _bulk_docs requests">>}
+]}.
{[couchdb, httpd, bulk_requests], [
{type, counter},
{desc, <<"number of bulk requests">>}
http://git-wip-us.apache.org/repos/asf/couchdb-couch/blob/0fdc50bf/src/couch_httpd_db.erl
----------------------------------------------------------------------
diff --git a/src/couch_httpd_db.erl b/src/couch_httpd_db.erl
index a3f2902..4337f41 100644
--- a/src/couch_httpd_db.erl
+++ b/src/couch_httpd_db.erl
@@ -304,6 +304,7 @@ db_req(#httpd{method='POST',path_parts=[_,<<"_bulk_docs">>]}=Req, Db) ->
undefined ->
send_error(Req, 400, <<"bad_request">>, <<"Missing JSON list of 'docs'">>);
DocsArray ->
+ couch_stats:update_histogram([couchdb, httpd, bulk_docs], length(DocsArray)),
case couch_httpd:header_value(Req, "X-Couch-Full-Commit") of
"true" ->
Options = [full_commit];