garrensmith commented on a change in pull request #768: basic execution 
statistics for _find
URL: https://github.com/apache/couchdb/pull/768#discussion_r134978868
 
 

 ##########
 File path: src/mango/src/mango_httpd.erl
 ##########
 @@ -266,6 +267,11 @@ run_find(Resp, Db, Sel, Opts) ->
     mango_crud:find(Db, Sel, fun handle_doc/2, Acc0, Opts).
 
 
+handle_doc({add_key, Key, Value = #execution_stats{}}, Acc0) ->
 
 Review comment:
   I think what Tony is saying here is you don't need to do the 
`lists:keystore` in this function. Rather convert to json and then call 
`handle_doc()` again so that the function below will do all lists:keystore work.
   I also think you could consider doing the `to_json` and in the 
cursor:execute sections. Then you don't need to add a whole new function.
 
----------------------------------------------------------------
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