pgj commented on code in PR #4990:
URL: https://github.com/apache/couchdb/pull/4990#discussion_r1512866689


##########
src/mango/src/mango_execution_stats.erl:
##########
@@ -37,12 +37,23 @@
 -define(SHARD_STATS_KEY, mango_shard_execution_stats).
 
 to_json(Stats) ->
+    to_json(Stats, true).
+
+to_json(Stats, IncludeDbName) ->
+    Base =

Review Comment:
   That said, it would look nice in this case as well.  Of course, this is just 
a suggestion, I am adding this example for consideration only where `Base` is 
removed completely:
   
   ```erlang
      {[
           {total_keys_examined, Stats#execution_stats.totalKeysExamined},
           {total_docs_examined, Stats#execution_stats.totalDocsExamined},
           {total_quorum_docs_examined, 
Stats#execution_stats.totalQuorumDocsExamined},
           {results_returned, Stats#execution_stats.resultsReturned},
           {execution_time_ms, Stats#execution_stats.executionTimeMs}
           | [{dbname, Stats#execution_stats.dbname} || IncludeDbName]
       ]}.
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to