Skip to content
This repository was archived by the owner on May 25, 2021. It is now read-only.

Commit 374476b

Browse files
committed
Add new counter to track the number of docs being processed using
bulk_docs request.
1 parent 7cffe7e commit 374476b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/chttpd_db.erl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,7 @@ db_req(#httpd{method='POST',path_parts=[_,<<"_bulk_docs">>], user_ctx=Ctx}=Req,
375375
DocsArray0
376376
end,
377377
couch_stats:update_histogram([couchdb, httpd, bulk_docs], length(DocsArray)),
378+
couch_stats:increment_counter([couchdb, bulk_request_docs], length(DocsArray)),
378379
W = case couch_util:get_value(<<"w">>, JsonProps) of
379380
Value when is_integer(Value) ->
380381
integer_to_list(Value);
@@ -448,6 +449,7 @@ db_req(#httpd{method='POST', path_parts=[_, <<"_bulk_get">>]}=Req, Db) ->
448449
undefined ->
449450
throw({bad_request, <<"Missing JSON list of 'docs'.">>});
450451
Docs ->
452+
couch_stats:increment_counter([couchdb, bulk_request_docs], length(Docs)),
451453
#doc_query_args{
452454
options = Options
453455
} = bulk_get_parse_doc_query(Req),

0 commit comments

Comments
 (0)