@libp2p/prometheus-metrics 2.0.7 → 2.0.8
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/dist/src/utils.d.ts +1 -1
- package/dist/src/utils.d.ts.map +1 -1
- package/package.json +7 -6
- package/src/utils.ts +1 -1
package/dist/src/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CalculateMetric } from '@libp2p/interface/metrics';
|
|
2
2
|
export interface CalculatedMetric<T = number> {
|
|
3
|
-
addCalculator
|
|
3
|
+
addCalculator(calculator: CalculateMetric<T>): void;
|
|
4
4
|
}
|
|
5
5
|
export declare const ONE_SECOND = 1000;
|
|
6
6
|
export declare const ONE_MINUTE: number;
|
package/dist/src/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAEhE,MAAM,WAAW,gBAAgB,CAAE,CAAC,GAAG,MAAM;IAC3C,aAAa,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAEhE,MAAM,WAAW,gBAAgB,CAAE,CAAC,GAAG,MAAM;IAC3C,aAAa,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA;CACpD;AAED,eAAO,MAAM,UAAU,OAAO,CAAA;AAC9B,eAAO,MAAM,UAAU,QAAkB,CAAA;AAEzC;;;GAGG;AACH,wBAAgB,eAAe,CAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAIpD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@libp2p/prometheus-metrics",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
4
4
|
"description": "Collect libp2p metrics for scraping by Prometheus or Graphana",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "Apache-2.0 OR MIT",
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
"eslintConfig": {
|
|
30
30
|
"extends": "ipfs",
|
|
31
31
|
"parserOptions": {
|
|
32
|
+
"project": true,
|
|
32
33
|
"sourceType": "module"
|
|
33
34
|
}
|
|
34
35
|
},
|
|
@@ -42,17 +43,17 @@
|
|
|
42
43
|
"test:electron-main": "aegir test -t electron-main --cov"
|
|
43
44
|
},
|
|
44
45
|
"dependencies": {
|
|
45
|
-
"@libp2p/interface": "^0.1.
|
|
46
|
-
"@libp2p/logger": "^3.0.
|
|
46
|
+
"@libp2p/interface": "^0.1.3",
|
|
47
|
+
"@libp2p/logger": "^3.0.3",
|
|
47
48
|
"it-foreach": "^2.0.3",
|
|
48
49
|
"it-stream-types": "^2.0.1",
|
|
49
50
|
"prom-client": "^14.2.0"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
52
|
-
"@libp2p/interface-compliance-tests": "^4.1.
|
|
53
|
-
"@libp2p/peer-id-factory": "^3.0.
|
|
53
|
+
"@libp2p/interface-compliance-tests": "^4.1.1",
|
|
54
|
+
"@libp2p/peer-id-factory": "^3.0.5",
|
|
54
55
|
"@multiformats/multiaddr": "^12.1.3",
|
|
55
|
-
"aegir": "^
|
|
56
|
+
"aegir": "^41.0.2",
|
|
56
57
|
"it-drain": "^3.0.2",
|
|
57
58
|
"it-pipe": "^3.0.1",
|
|
58
59
|
"p-defer": "^4.0.0"
|
package/src/utils.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CalculateMetric } from '@libp2p/interface/metrics'
|
|
2
2
|
|
|
3
3
|
export interface CalculatedMetric <T = number> {
|
|
4
|
-
addCalculator
|
|
4
|
+
addCalculator(calculator: CalculateMetric<T>): void
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
export const ONE_SECOND = 1000
|