jiangphcn commented on a change in pull request #1649: Add document_purges 
counter for stats
URL: https://github.com/apache/couchdb/pull/1649#discussion_r224633743
 
 

 ##########
 File path: src/chttpd/src/chttpd_db.erl
 ##########
 @@ -522,6 +522,7 @@ 
db_req(#httpd{method='POST',path_parts=[_,<<"_purge">>]}=Req, Db) ->
         false -> throw({bad_request, "Exceeded maximum number of revisions."});
         true -> ok
     end,
+    couch_stats:increment_counter([couchdb, document_purges], 
length(IdsRevs2)),
 
 Review comment:
   thanks @tonysun83 for review. For this counter, the description is 
   ```
   {[couchdb, document_purges], [
       {type, counter},
       {desc, <<"number of document purge operations">>}
   ```
   So it is about the number of documents which are involved in purge 
operations. I think that it is good that we add another counter to indicate how 
many documents were purged. I will address in another PR if applicable.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to