From fec7818e7e02e3e6e7fe514cf543b6be719a025b Mon Sep 17 00:00:00 2001 From: kgmyatthu <2962000kaungmyatthu@gmail.com> Date: Tue, 7 May 2024 13:29:58 +0700 Subject: [PATCH] feat: display queue details --- public/large-network.js | 12 ++++++++++++ views/large-network.html | 19 +++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/public/large-network.js b/public/large-network.js index b2beb27..952b04e 100644 --- a/public/large-network.js +++ b/public/large-network.js @@ -40,11 +40,16 @@ netLoad: 0, load: 0, maxLoad: 0, + queueLength: 0, + queueTime: 0, + expiredTx: 0, + }, colorMode: 'state', shouldShowMaxTps: false, shouldShowMaxLoad: false, animateTransactions: false, + queueDetails: false, } }, async mounted() { @@ -206,6 +211,8 @@ let cycleMarkers = [] let desired = [] let crashedCount = 0 + let queueLength = [] + let queueTime = [] for (let nodeId in report.nodes.active) { const node = report.nodes.active[nodeId] @@ -213,6 +220,8 @@ counters.push(node.cycleCounter) cycleMarkers.push(node.cycleMarker) desired.push(node.desiredNodes) + queueLength.push(node.queueLength) + queueTime.push(node.txTimeInQueue) } this.networkStatus.tps = report.avgTps @@ -232,6 +241,9 @@ if (this.networkStatus.load > this.networkStatus.maxLoad) { this.networkStatus.maxLoad = this.networkStatus.load } + this.expiredTx = report.totalExpired + this.networkStatus.queueLength = this.average(queueLength) + this.networkStatus.queueTime = this.average(queueTime) }, deleteCrashedNodes(nodes) { console.log('Running delete crash nodes', nodes) diff --git a/views/large-network.html b/views/large-network.html index bb8b075..21ed9b7 100644 --- a/views/large-network.html +++ b/views/large-network.html @@ -105,6 +105,21 @@ + +
+ + + + + + + + + + + +
Exp.TxQ.TimeQ.Length
{{ networkStatus.expiredTx }}{{ networkStatus.queueTime.toFixed(2) }}{{ networkStatus.queueLength.toFixed(2) }}
+
@@ -158,6 +173,10 @@
+
+ + +
Charts Sync History