统计相关更新

This commit is contained in:
2026-06-04 00:09:16 +08:00
parent 63676f7f34
commit 7c1b30b3a0
3 changed files with 45 additions and 6 deletions
+3 -2
View File
@@ -12,6 +12,7 @@ type mqttRuntimeStatus struct {
server *mqtt.Server
address string
tls bool
stats *meshtasticMessageStats
}
type adminMqttStatus struct {
@@ -67,8 +68,8 @@ func (m mqttRuntimeStatus) Status() adminMqttStatus {
ClientsMaximum: info.ClientsMaximum,
ClientsTotal: info.ClientsTotal,
MessagesReceived: info.MessagesReceived,
MessagesSent: info.MessagesSent,
MessagesDropped: info.MessagesDropped,
MessagesSent: m.stats.Forwarded(),
MessagesDropped: m.stats.Dropped(),
Retained: info.Retained,
Inflight: info.Inflight,
InflightDropped: info.InflightDropped,