Skip to content

Commit

Permalink
Update queue metrics IT
Browse files Browse the repository at this point in the history
Signed-off-by: Evgeny Malygin <emalygin@bloomberg.net>
  • Loading branch information
678098 committed Aug 2, 2024
1 parent c4bcfa3 commit a9e5a13
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 55 deletions.
3 changes: 0 additions & 3 deletions src/groups/mqb/mqbs/mqbs_virtualstoragecatalog.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ class VirtualStorageCatalog {

typedef VirtualStorages::const_iterator VirtualStoragesConstIter;

typedef bsl::function<void(const bsl::string&)>
AppIdVisitor; // todo remove

private:
// DATA
mqbi::Storage* d_storage_p; // Physical storage underlying all
Expand Down
12 changes: 8 additions & 4 deletions src/groups/mqb/mqbstat/mqbstat_jsonprinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,14 @@ class JsonPrinter::JsonPrinterImpl {
inline JsonPrinter::JsonPrinterImpl::JsonPrinterImpl(
const StatContextsMap& statContextsMap,
bslma::Allocator* allocator)
: d_opsCompact(bdljsn::WriteOptions().setSpacesPerLevel(0).setStyle(
bdljsn::WriteStyle::e_COMPACT))
, d_opsPretty(bdljsn::WriteOptions().setSpacesPerLevel(4).setStyle(
bdljsn::WriteStyle::e_PRETTY))
: d_opsCompact(bdljsn::WriteOptions()
.setSpacesPerLevel(0)
.setStyle(bdljsn::WriteStyle::e_COMPACT)
.setSortMembers(true))
, d_opsPretty(bdljsn::WriteOptions()
.setSpacesPerLevel(4)
.setStyle(bdljsn::WriteStyle::e_PRETTY)
.setSortMembers(true))
, d_contexts(statContextsMap, allocator)
{
// NOTHING
Expand Down
112 changes: 64 additions & 48 deletions src/python/blazingmq/dev/it/data/data_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,68 +55,76 @@ def check(self, value: Any) -> bool:
"appIds": {
"bar": {
"values": {
"queue_confirm_time_max": 0,
"queue_confirm_time_avg": 0,
"queue_nack_msgs": 0,
"queue_ack_time_max": 0,
"queue_ack_msgs": 0,
"queue_ack_time_avg": 0,
"queue_ack_time_max": 0,
"queue_bytes_current": 96,
"queue_confirm_msgs": 0,
"queue_push_bytes": 0,
"queue_confirm_time_avg": 0,
"queue_confirm_time_max": 0,
"queue_consumers_count": 0,
"queue_msgs_current": 32,
"queue_nack_msgs": 0,
"queue_producers_count": 0,
"queue_push_bytes": 0,
"queue_push_msgs": 0,
"queue_ack_time_avg": 0,
"queue_put_bytes": 0,
"queue_put_msgs": 0,
}
},
"baz": {
"values": {
"queue_confirm_time_max": 0,
"queue_confirm_time_avg": 0,
"queue_nack_msgs": 0,
"queue_ack_time_max": 0,
"queue_ack_msgs": 0,
"queue_ack_time_avg": 0,
"queue_ack_time_max": 0,
"queue_bytes_current": 96,
"queue_confirm_msgs": 0,
"queue_push_bytes": 0,
"queue_confirm_time_avg": 0,
"queue_confirm_time_max": 0,
"queue_consumers_count": 0,
"queue_msgs_current": 32,
"queue_nack_msgs": 0,
"queue_producers_count": 0,
"queue_push_bytes": 0,
"queue_push_msgs": 0,
"queue_ack_time_avg": 0,
"queue_put_bytes": 0,
"queue_put_msgs": 0,
}
},
"foo": {
"values": {
"queue_confirm_time_max": 0,
"queue_confirm_time_avg": 0,
"queue_nack_msgs": 0,
"queue_ack_time_max": 0,
"queue_ack_msgs": 0,
"queue_ack_time_avg": 0,
"queue_ack_time_max": 0,
"queue_bytes_current": 96,
"queue_confirm_msgs": 0,
"queue_push_bytes": 0,
"queue_confirm_time_avg": 0,
"queue_confirm_time_max": 0,
"queue_consumers_count": 0,
"queue_msgs_current": 32,
"queue_nack_msgs": 0,
"queue_producers_count": 0,
"queue_push_bytes": 0,
"queue_push_msgs": 0,
"queue_ack_time_avg": 0,
"queue_put_bytes": 0,
"queue_put_msgs": 0,
}
},
},
"values": {
"queue_confirm_time_max": 0,
"queue_confirm_time_avg": 0,
"queue_nack_msgs": 0,
"queue_ack_time_max": GreaterThan(0),
"queue_ack_msgs": 32,
"queue_ack_time_avg": GreaterThan(0),
"queue_ack_time_max": GreaterThan(0),
"queue_bytes_current": 96,
"queue_confirm_msgs": 0,
"queue_push_bytes": 0,
"queue_confirm_time_avg": 0,
"queue_confirm_time_max": 0,
"queue_consumers_count": 0,
"queue_msgs_current": 32,
"queue_nack_msgs": 0,
"queue_producers_count": 0,
"queue_push_bytes": 0,
"queue_push_msgs": 0,
"queue_ack_time_avg": GreaterThan(0),
"queue_put_bytes": 96,
"queue_put_msgs": 32,
},
Expand All @@ -126,68 +134,76 @@ def check(self, value: Any) -> bool:
"appIds": {
"bar": {
"values": {
"queue_confirm_time_max": GreaterThan(0),
"queue_confirm_time_avg": GreaterThan(0),
"queue_nack_msgs": 0,
"queue_ack_time_max": 0,
"queue_ack_msgs": 0,
"queue_ack_time_avg": 0,
"queue_ack_time_max": 0,
"queue_bytes_current": 30,
"queue_confirm_msgs": 0,
"queue_push_bytes": 0,
"queue_confirm_time_avg": GreaterThan(0),
"queue_confirm_time_max": GreaterThan(0),
"queue_consumers_count": 0,
"queue_msgs_current": 10,
"queue_nack_msgs": 0,
"queue_producers_count": 0,
"queue_push_bytes": 0,
"queue_push_msgs": 0,
"queue_ack_time_avg": 0,
"queue_put_bytes": 0,
"queue_put_msgs": 0,
}
},
"baz": {
"values": {
"queue_confirm_time_max": GreaterThan(0),
"queue_confirm_time_avg": GreaterThan(0),
"queue_nack_msgs": 0,
"queue_ack_time_max": 0,
"queue_ack_msgs": 0,
"queue_ack_time_avg": 0,
"queue_ack_time_max": 0,
"queue_bytes_current": 63,
"queue_confirm_msgs": 0,
"queue_push_bytes": 0,
"queue_confirm_time_avg": GreaterThan(0),
"queue_confirm_time_max": GreaterThan(0),
"queue_consumers_count": 0,
"queue_msgs_current": 21,
"queue_nack_msgs": 0,
"queue_producers_count": 0,
"queue_push_bytes": 0,
"queue_push_msgs": 0,
"queue_ack_time_avg": 0,
"queue_put_bytes": 0,
"queue_put_msgs": 0,
}
},
"foo": {
"values": {
"queue_confirm_time_max": GreaterThan(0),
"queue_confirm_time_avg": GreaterThan(0),
"queue_nack_msgs": 0,
"queue_ack_time_max": 0,
"queue_ack_msgs": 0,
"queue_ack_time_avg": 0,
"queue_ack_time_max": 0,
"queue_bytes_current": 0,
"queue_confirm_msgs": 0,
"queue_push_bytes": 0,
"queue_confirm_time_avg": GreaterThan(0),
"queue_confirm_time_max": GreaterThan(0),
"queue_consumers_count": 0,
"queue_msgs_current": 0,
"queue_nack_msgs": 0,
"queue_producers_count": 0,
"queue_push_bytes": 0,
"queue_push_msgs": 0,
"queue_ack_time_avg": 0,
"queue_put_bytes": 0,
"queue_put_msgs": 0,
}
},
},
"values": {
"queue_confirm_time_max": GreaterThan(0),
"queue_confirm_time_avg": GreaterThan(0),
"queue_nack_msgs": 0,
"queue_ack_time_max": GreaterThan(0),
"queue_ack_msgs": 32,
"queue_ack_time_avg": GreaterThan(0),
"queue_ack_time_max": GreaterThan(0),
"queue_bytes_current": 63,
"queue_confirm_msgs": 65,
"queue_push_bytes": 288,
"queue_confirm_time_avg": GreaterThan(0),
"queue_confirm_time_max": GreaterThan(0),
"queue_consumers_count": 3,
"queue_msgs_current": 21,
"queue_nack_msgs": 0,
"queue_producers_count": 0,
"queue_push_bytes": 288,
"queue_push_msgs": 96,
"queue_ack_time_avg": GreaterThan(0),
"queue_put_bytes": 96,
"queue_put_msgs": 32,
},
Expand Down

0 comments on commit a9e5a13

Please sign in to comment.