blind-peer 3.2.0 → 3.4.0
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/index.js +53 -0
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -15,6 +15,9 @@ const IdEnc = require('hypercore-id-encoding')
|
|
|
15
15
|
|
|
16
16
|
const BlindPeerDB = require('./lib/db.js')
|
|
17
17
|
|
|
18
|
+
// Enable Small wants in Hypercore. Must be before anywhere that uses Hypercore
|
|
19
|
+
Hypercore.enable(Hypercore.SMALL_WANTS)
|
|
20
|
+
|
|
18
21
|
const { AddCoreEncoding, DeleteCoreEncoding } = require('blind-peer-encodings')
|
|
19
22
|
|
|
20
23
|
class CoreTracker {
|
|
@@ -819,6 +822,56 @@ class BlindPeer extends ReadyResource {
|
|
|
819
822
|
this.set(self.stats.addCoresRx)
|
|
820
823
|
}
|
|
821
824
|
})
|
|
825
|
+
if (self.rocks.stats) {
|
|
826
|
+
new promClient.Gauge({
|
|
827
|
+
// eslint-disable-line no-new
|
|
828
|
+
name: 'blind_peer_rocks_gets',
|
|
829
|
+
help: 'The amount of get ops from RocksDB',
|
|
830
|
+
collect() {
|
|
831
|
+
this.set(self.rocks.stats.gets)
|
|
832
|
+
}
|
|
833
|
+
})
|
|
834
|
+
new promClient.Gauge({
|
|
835
|
+
// eslint-disable-line no-new
|
|
836
|
+
name: 'blind_peer_rocks_puts',
|
|
837
|
+
help: 'The amount of put ops to RocksDB',
|
|
838
|
+
collect() {
|
|
839
|
+
this.set(self.rocks.stats.puts)
|
|
840
|
+
}
|
|
841
|
+
})
|
|
842
|
+
new promClient.Gauge({
|
|
843
|
+
// eslint-disable-line no-new
|
|
844
|
+
name: 'blind_peer_rocks_deletes',
|
|
845
|
+
help: 'The amount of delete ops from RocksDB',
|
|
846
|
+
collect() {
|
|
847
|
+
this.set(self.rocks.stats.deletes)
|
|
848
|
+
}
|
|
849
|
+
})
|
|
850
|
+
new promClient.Gauge({
|
|
851
|
+
// eslint-disable-line no-new
|
|
852
|
+
name: 'blind_peer_rocks_range_deletes',
|
|
853
|
+
help: 'The amount of range delete ops from RocksDB',
|
|
854
|
+
collect() {
|
|
855
|
+
this.set(self.rocks.stats.rangeDeletes)
|
|
856
|
+
}
|
|
857
|
+
})
|
|
858
|
+
new promClient.Gauge({
|
|
859
|
+
// eslint-disable-line no-new
|
|
860
|
+
name: 'blind_peer_rocks_read_batches',
|
|
861
|
+
help: 'The amount of read batches from RocksDB',
|
|
862
|
+
collect() {
|
|
863
|
+
this.set(self.rocks.stats.readBatches)
|
|
864
|
+
}
|
|
865
|
+
})
|
|
866
|
+
new promClient.Gauge({
|
|
867
|
+
// eslint-disable-line no-new
|
|
868
|
+
name: 'blind_peer_rocks_write_batches',
|
|
869
|
+
help: 'The amount of write batches to RocksDB',
|
|
870
|
+
collect() {
|
|
871
|
+
this.set(self.rocks.stats.writeBatches)
|
|
872
|
+
}
|
|
873
|
+
})
|
|
874
|
+
}
|
|
822
875
|
}
|
|
823
876
|
}
|
|
824
877
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blind-peer",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "Blind peers help keep hypercores available",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"dependencies": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"blind-peer-muxer": "^1.0.0",
|
|
11
11
|
"compact-encoding": "^2.16.0",
|
|
12
12
|
"corestore": "^7.4.4",
|
|
13
|
-
"hypercore": "^11.0
|
|
13
|
+
"hypercore": "^11.26.0",
|
|
14
14
|
"hypercore-crypto": "^3.5.0",
|
|
15
15
|
"hypercore-id-encoding": "^1.3.0",
|
|
16
16
|
"hyperdb": "^5.0.0",
|