@peerbit/server 5.8.3-9b0640c → 5.8.4-2f6fc7f

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peerbit/server",
3
- "version": "5.8.3-9b0640c",
3
+ "version": "5.8.4-2f6fc7f",
4
4
  "author": "dao.xyz",
5
5
  "repository": {
6
6
  "type": "git",
@@ -66,8 +66,8 @@
66
66
  "lint": "aegir lint"
67
67
  },
68
68
  "devDependencies": {
69
- "@peerbit/test-lib": "0.0.1-9b0640c",
70
- "@peerbit/test-utils": "2.2.1-9b0640c",
69
+ "@peerbit/test-lib": "0.0.1-2f6fc7f",
70
+ "@peerbit/test-utils": "2.2.1-2f6fc7f",
71
71
  "@types/yargs": "17.0.24",
72
72
  "aws-sdk": "^2.1259.0",
73
73
  "dotenv": "^16.1.4",
@@ -78,7 +78,7 @@
78
78
  "dependencies": {
79
79
  "axios": "^1.4.0",
80
80
  "chalk": "^5.3.0",
81
- "peerbit": "4.3.0-9b0640c",
81
+ "peerbit": "4.3.0-2f6fc7f",
82
82
  "yargs": "^17.7.2",
83
83
  "tar-stream": "^3.1.7",
84
84
  "tmp": "^0.2.1",
package/src/cli.ts CHANGED
@@ -797,6 +797,18 @@ export const cli = async (args?: string[]) => {
797
797
  }
798
798
  },
799
799
  })
800
+ .command({
801
+ command: "stats",
802
+ describe: "Get connection and dial queue stats",
803
+ handler: async () => {
804
+ for (const api of apis) {
805
+ const s = await api.api.peer.stats.get();
806
+ api.log(
807
+ `connections total=${s.connections.total} inbound=${s.connections.inbound} outbound=${s.connections.outbound} | dialQueue pending=${s.dialQueue.pending}`,
808
+ );
809
+ }
810
+ },
811
+ })
800
812
  .command({
801
813
  command: "address",
802
814
  describe: "Get addresses",