@ycodium-ai/plugin-resource-telemetry 0.2.2126 → 0.2.2167
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/index.js +17 -11
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -646,11 +646,14 @@ var TelemetrySidecar = class {
|
|
|
646
646
|
this.pendingSamples.set(requestId, { resolve, reject });
|
|
647
647
|
});
|
|
648
648
|
try {
|
|
649
|
-
await
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
649
|
+
await Promise.race([
|
|
650
|
+
this.write({
|
|
651
|
+
version: RESOURCE_MONITOR_PROTOCOL_VERSION,
|
|
652
|
+
type: "sampleNow",
|
|
653
|
+
requestId
|
|
654
|
+
}),
|
|
655
|
+
settled
|
|
656
|
+
]);
|
|
654
657
|
return await withTimeout(settled, SAMPLE_REQUEST_TIMEOUT_MS, "sampleNow");
|
|
655
658
|
} finally {
|
|
656
659
|
this.pendingSamples.delete(requestId);
|
|
@@ -663,12 +666,15 @@ var TelemetrySidecar = class {
|
|
|
663
666
|
this.pendingHistories.set(requestId, { resolve, reject, snapshots: [] });
|
|
664
667
|
});
|
|
665
668
|
try {
|
|
666
|
-
await
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
669
|
+
await Promise.race([
|
|
670
|
+
this.write({
|
|
671
|
+
version: RESOURCE_MONITOR_PROTOCOL_VERSION,
|
|
672
|
+
type: "readHistory",
|
|
673
|
+
requestId,
|
|
674
|
+
windowMs: Math.max(0, Math.round(windowMs))
|
|
675
|
+
}),
|
|
676
|
+
settled
|
|
677
|
+
]);
|
|
672
678
|
return await withTimeout(settled, HISTORY_REQUEST_TIMEOUT_MS, "readHistory");
|
|
673
679
|
} finally {
|
|
674
680
|
this.pendingHistories.delete(requestId);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ycodium-ai/plugin-resource-telemetry",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2167",
|
|
4
4
|
"description": "Measures what this machine's processes cost in CPU, memory and disk.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"telemetry",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"effect": "4.0.0-beta.103",
|
|
21
21
|
"esbuild": "0.28.1",
|
|
22
22
|
"vite-plus": "0.2.2",
|
|
23
|
-
"@ycodium-ai/plugin-api": "0.2.
|
|
23
|
+
"@ycodium-ai/plugin-api": "0.2.2167"
|
|
24
24
|
},
|
|
25
25
|
"ycodium": {
|
|
26
26
|
"plugin": "./dist/index.js",
|