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


##########
src/couch_prometheus/src/couch_prometheus.erl:
##########
@@ -384,3 +396,100 @@ get_bt_engine_cache_stats() ->
         to_prom(couchdb_bt_engine_cache_memory, gauge, "memory used by the 
btree cache", Mem),
         to_prom(couchdb_bt_engine_cache_size, gauge, "number of entries in the 
btree cache", Size)
     ].
+
+get_clouseau_status() ->
+    Value =
+        case clouseau_rpc:connected() of
+            true -> ?CLOUSEAU_CONNECTED;
+            false -> ?CLOUSEAU_DISCONNECTED
+        end,
+    to_prom(clouseau_connected, gauge, "clouseau connectivity status", Value).
+
+get_database_count() ->
+    ShardsDb = config:get("mem3", "shards_db", "_dbs"),
+    case fabric:get_db_info(ShardsDb) of
+        {ok, Info} ->
+            DbCount = couch_util:get_value(doc_count, Info),
+            to_prom(database_count, gauge, "total database count", DbCount);
+        {error, Reason} ->
+            couch_log:warning("~p failed to get database count: ~p", [?MODULE, 
Reason]),
+            []
+    end.
+
+get_ioq_stats() ->
+    IOQData = ioq:get_disk_queues(),

Review Comment:
   One issue with this ioq is it's almost too wide spreading N queues over N 
schedulers that it effectively becomes a bypass.  Ideally we'd have a little 
bit of a queue to do the prioritization against. Maybe we could some kind of a 
configurable limit or middle ground have 8 or 16 IO queues even if we have 80 
schedulers...



-- 
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