nickva commented on code in PR #4958: URL: https://github.com/apache/couchdb/pull/4958#discussion_r1462074791
########## src/mango/src/mango_execution_stats.erl: ########## @@ -123,19 +123,19 @@ shard_init() -> InitialState = #{docs_examined => 0, keys_examined => 0}, put(?SHARD_STATS_KEY, InitialState). --spec shard_incr_keys_examined() -> any(). -shard_incr_keys_examined() -> - incr(keys_examined). +-spec shard_incr_keys_examined(integer()) -> any(). +shard_incr_keys_examined(N) -> + incr(keys_examined, N). --spec shard_incr_docs_examined() -> any(). -shard_incr_docs_examined() -> - incr(docs_examined). +-spec shard_incr_docs_examined(integer()) -> any(). +shard_incr_docs_examined(N) -> + incr(docs_examined, N). --spec incr(atom()) -> any(). -incr(Key) -> +-spec incr(atom(), integer()) -> any(). +incr(Key, N) -> Review Comment: Add `is_integer(N)` guard and possible N>1 or N>=0 depending on our constraints here. -- 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