jaydoane commented on code in PR #5150:
URL: https://github.com/apache/couchdb/pull/5150#discussion_r1688974193
##########
src/rexi/src/rexi_server_mon.erl:
##########
@@ -43,6 +43,14 @@ start_link(ChildMod) ->
status() ->
gen_server:call(?MODULE, status).
+aggregate_queue_len(rexi_buffer) ->
+ % rexi_buffer acts as an explicit message queue. In order to get useful
+ % metrics from it we really need to add both its process' message queue and
+ % already buffered messages.
+ ServerIds = server_ids(rexi_buffer),
+ MQLengths = [message_queue_len(ServerId) || ServerId <- ServerIds],
+ BufLengths = [rexi_buffer:get_buffered_count(ServerId) || ServerId <-
ServerIds],
+ lists:sum(MQLengths) + lists:sum(BufLengths);
Review Comment:
It's awesome that you improved test coverage of `rexi_buffer` from 0% to
82%, but I notice this new function clause does not have coverage. I tested it
manually, and it seems to work, but I wonder if it would be worth adding a test
explicitly for this?
--
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]