From 62cb050a379c622fb0d9555cbf16b65a2b6eac4c Mon Sep 17 00:00:00 2001 From: Marc Hanson <3117293+mhanson-github@users.noreply.github.com> Date: Sun, 2 Jun 2024 14:42:20 -0400 Subject: [PATCH 1/5] Clean up large-network view Add categories for various output in nice tables. Add some missing values. Move all info to tables at top of screen instead of being placed all over in random locations. --- public/large-network.js | 20 +- views/large-network.html | 425 +++++++++++++++++++++------------------ 2 files changed, 248 insertions(+), 197 deletions(-) diff --git a/public/large-network.js b/public/large-network.js index 952b04e..fc456cf 100644 --- a/public/large-network.js +++ b/public/large-network.js @@ -1,4 +1,4 @@ -;(function main() { +; (function main() { const G = {} loadToken(G) G.VW = Math.max(document.documentElement.clientWidth, window.innerWidth || 0) @@ -39,15 +39,16 @@ rejectedTps: 0, netLoad: 0, load: 0, + totalLoad: 0, maxLoad: 0, queueLength: 0, + totalQueueLength: 0, queueTime: 0, + totalQueueTime: 0, expiredTx: 0, }, colorMode: 'state', - shouldShowMaxTps: false, - shouldShowMaxLoad: false, animateTransactions: false, queueDetails: false, } @@ -214,13 +215,20 @@ let queueLength = [] let queueTime = [] + let totalLoad = 0 + let totalQueueLength = 0 + let totalQueueTime = 0.0 + for (let nodeId in report.nodes.active) { const node = report.nodes.active[nodeId] + totalLoad += node.currentLoad.networkLoad loads.push(node.currentLoad.networkLoad) counters.push(node.cycleCounter) cycleMarkers.push(node.cycleMarker) desired.push(node.desiredNodes) + totalQueueLength += node.queueLength queueLength.push(node.queueLength) + totalQueueTime += node.txTimeInQueue queueTime.push(node.txTimeInQueue) } @@ -235,6 +243,7 @@ this.networkStatus.standby = Object.keys(report.nodes.standby).length this.networkStatus.load = this.average(loads) + this.networkStatus.totalLoad = totalLoad this.networkStatus.counter = this.mode(counters) this.networkStatus.cycleMarker = this.mode(cycleMarkers) this.networkStatus.desired = this.mode(desired) @@ -243,7 +252,9 @@ } this.expiredTx = report.totalExpired this.networkStatus.queueLength = this.average(queueLength) + this.networkStatus.totalQueueLength = totalQueueLength this.networkStatus.queueTime = this.average(queueTime) + this.networkStatus.totalQueueTime = totalQueueTime }, deleteCrashedNodes(nodes) { console.log('Running delete crash nodes', nodes) @@ -325,8 +336,7 @@ try { let changes = await this.fetchChanges() console.log( - `Total of ${Object.keys(changes.nodes.active).length}/${ - Object.keys(G.nodes.active).length + `Total of ${Object.keys(changes.nodes.active).length}/${Object.keys(G.nodes.active).length } nodes updated.` ) this.filterOutCrashedNodes(changes) diff --git a/views/large-network.html b/views/large-network.html index 21ed9b7..9f20d6b 100644 --- a/views/large-network.html +++ b/views/large-network.html @@ -1,203 +1,244 @@ - - - - - - - - - + #montable { + font-family: sans-serif; + font-size: small; + font-weight: 300; + text-align: left; + background-color: #f3f4f6; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + border-collapse: collapse; + flex-shrink: 0; + } - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
CounterJoiningStandbySyncingActiveDesired - Max Tps - Avg Tps - ProcessedRejectedRejected TPS - Max Load - Load -
{{ networkStatus.counter }}{{ networkStatus.joining - networkStatus.standby }}{{ networkStatus.standby }}{{ networkStatus.syncing }}{{ networkStatus.active }}{{ networkStatus.desired }} - {{ networkStatus.maxTps }} - {{ networkStatus.tps }} - {{ networkStatus.processed }}{{ networkStatus.rejected }}{{ networkStatus.rejectedTps }} - {{ networkStatus.maxLoad ? networkStatus.maxLoad.toFixed(2) : 0.0 - }} - {{ networkStatus.load ? networkStatus.load.toFixed(2) : 0.0 - }} -
-
+ #monheader { + text-align: left; + font-weight: bold; + vertical-align: middle; + } -
- - - - - - - - - - - -
Exp.TxQ.TimeQ.Length
{{ networkStatus.expiredTx }}{{ networkStatus.queueTime.toFixed(2) }}{{ networkStatus.queueLength.toFixed(2) }}
-
-
-
-
- Monitor-server version: x.x.x -
- Monitor-client version:  x.x.x -
-
-
- -
- -
- - - -
-
-
+ #monlabel { + vertical-align: middle; + text-align: left; + } + + #monval { + vertical-align: top; + text-align: right; + } + + #itemrow { + vertical-align: top; + border: 0px solid #000000; + } + + tr>td { + padding: 5px; + } + + -
-
- - -
-
- - -
- Charts - Sync History - Node History - Monitor Logs - Monitor Events - App Versions -
-
+ +
+
+ + + + + + + + + + + + + + + + + + + +
MONITOR TOOL
Server: vx.x.x
Client vx.x.x
Animate:
Color: + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NETWORK
Counter:{{networkStatus.counter}}
Joining:{{networkStatus.joining - networkStatus.standby}}
Standby:{{networkStatus.standby}}
Syncing:{{networkStatus.syncing}}
Active:{{networkStatus.active}}
Desired:{{networkStatus.desired}}
+ + + + + + + + + + + + + + + + +
TXN
Proc:{{ networkStatus.processed }}
Rej:{{ networkStatus.rejected }}
Exp:{{ networkStatus.expiredTx }}
+ + + + + + + + + + + + + + + + +
TPS
Cur:{{networkStatus.tps}}
Max:{{networkStatus.maxTps}}
Rej:{{networkStatus.rejectedTps}}
+ + + + + + + + + + + + + + + + +
LOAD
Total:{{ networkStatus.totalLoad ? networkStatus.totalLoad.toFixed(2) : 0}}
Curr:{{ networkStatus.load ? networkStatus.load.toFixed(2) : 0}}
Max:{{ networkStatus.maxLoad ? networkStatus.maxLoad.toFixed(2) : 0}}
+ + + + + + + + + + + + + + + + + + + + +
QUEUE
QLen:{{ networkStatus.queueLength.toFixed(2) }}
QLen.Tot:{{ networkStatus.totalQueueLength.toFixed(2) }}
Q-Time:{{ networkStatus.queueTime.toFixed(2) }}
Q-Time.Tot:{{ networkStatus.totalQueueTime.toFixed(2) }}
+ + + + + + + + + + + + + + + + + + + + + + +
LINKS
Charts
Sync History
Node History
Monitor Logs
Monitor Events
App Versions
+
+ +
+
+ + + + + + + - - - - - - + \ No newline at end of file From 268f546efb57ccff1cc59939e03be66703992c36 Mon Sep 17 00:00:00 2001 From: Arham Jain Date: Wed, 5 Jun 2024 16:42:17 +0530 Subject: [PATCH 2/5] ci(script): fix release script --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4ea76e0..d3b23b5 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "node": "18.16.1" }, "scripts": { - "release": "np --any-branch --no-cleanup --no-tests --no-yarn", + "release": "np --any-branch --no-cleanup --no-tests --no-yarn --branch dev", "test": "echo \"Error: no test specified\" && exit 1", "compile": "tsc -p .", "prepare": "npm run compile", @@ -18,7 +18,7 @@ }, "repository": { "type": "git", - "url": "https://gitlab.com/shardus/enterprise/monitor-client.git" + "url": "git@github.com:shardeum/x-monitor-client.git" }, "publishConfig": { "access": "public" From 4d3452d4b0de8079d8c270363f51b6f64d1408c7 Mon Sep 17 00:00:00 2001 From: Arham Jain Date: Wed, 5 Jun 2024 16:42:58 +0530 Subject: [PATCH 3/5] 2.5.10 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 989a98d..1c3c0e2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@shardus/monitor-client", - "version": "2.5.9", + "version": "2.5.10", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@shardus/monitor-client", - "version": "2.5.9", + "version": "2.5.10", "license": "ISC", "dependencies": { "eslint": "8.43.0", diff --git a/package.json b/package.json index d3b23b5..117a228 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@shardus/monitor-client", - "version": "2.5.9", + "version": "2.5.10", "description": "", "main": "entry.js", "engines": { From 4150fa9328a7061ac3e6aaeab7f64cf275499420 Mon Sep 17 00:00:00 2001 From: sabdulazeem01 Date: Wed, 5 Jun 2024 15:25:39 +0300 Subject: [PATCH 4/5] fixed joining nodes counter --- views/large-network.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/large-network.html b/views/large-network.html index 9f20d6b..861d3e9 100644 --- a/views/large-network.html +++ b/views/large-network.html @@ -114,7 +114,7 @@ Joining: - {{networkStatus.joining - networkStatus.standby}} + {{networkStatus.joining}} Standby: From 50b88753f448b70502ed57756183d39ed8f2e965 Mon Sep 17 00:00:00 2001 From: sabdulazeem01 Date: Wed, 5 Jun 2024 15:41:57 +0300 Subject: [PATCH 5/5] Revert "fixed joining nodes counter" This reverts commit 4150fa9328a7061ac3e6aaeab7f64cf275499420. --- views/large-network.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/large-network.html b/views/large-network.html index 861d3e9..9f20d6b 100644 --- a/views/large-network.html +++ b/views/large-network.html @@ -114,7 +114,7 @@ Joining: - {{networkStatus.joining}} + {{networkStatus.joining - networkStatus.standby}} Standby: