tonysun83 commented on a change in pull request #768: basic execution
statistics for _find
URL: https://github.com/apache/couchdb/pull/768#discussion_r134622079
##########
File path: src/mango/src/mango_cursor_view.erl
##########
@@ -182,15 +193,19 @@ choose_best_index(_DbName, IndexRanges) ->
handle_message({meta, _}, Cursor) ->
{ok, Cursor};
handle_message({row, Props}, Cursor) ->
- case doc_member(Cursor#cursor.db, Props, Cursor#cursor.opts) of
- {ok, Doc} ->
- case mango_selector:match(Cursor#cursor.selector, Doc) of
+ ExecutionStats0 =
mango_execution_stats:incr_key_lookups(Cursor#cursor.execution_stats),
+ case doc_member(Cursor#cursor.db, Props, Cursor#cursor.opts,
ExecutionStats0) of
+ {ok, Doc, execution_stats, ExecutionStats1} ->
Review comment:
consider changing the return value here to be:
```
{ok, Doc, {execution_stats, ExecutionStats1}};
```
----------------------------------------------------------------
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