nickva commented on code in PR #4958:
URL: https://github.com/apache/couchdb/pull/4958#discussion_r1462066405


##########
src/mango/src/mango_cursor_view.erl:
##########
@@ -336,19 +348,66 @@ choose_best_index(IndexRanges) ->
     {SelectedIndex, SelectedIndexRanges, _} = hd(SortedIndexRanges),
     {{SelectedIndex, SelectedIndexRanges}, SortedIndexRanges}.
 
+-spec maybe_init_stats(Options) -> ok when
+    Options :: mrargs_extra().
+maybe_init_stats(Options) ->
+    case couch_util:get_value(execution_stats_rolling, Options, false) of
+        true -> ok;
+        false -> mango_execution_stats:shard_init()
+    end.
+
+-spec roll_stats(Stats, Options) -> ok when
+    Stats :: shard_stats_v2(),
+    Options :: mrargs_extra().
+roll_stats(Stats, Options) ->

Review Comment:
   Suggestion: add asserts about the types of args we're dealing with 
`roll_stats(#{} = Stats, Options) when is_list(Options) -> ...`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to