@teamvibe/poller 0.4.0 → 0.4.1
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.
|
@@ -11,6 +11,8 @@ export interface MetricsPayload {
|
|
|
11
11
|
todayMdLines?: number;
|
|
12
12
|
summaryMdBytes?: number;
|
|
13
13
|
summaryMdLines?: number;
|
|
14
|
+
heartbeatMdBytes?: number;
|
|
15
|
+
heartbeatMdLines?: number;
|
|
14
16
|
brainDirBytes?: number;
|
|
15
17
|
vmDiskFreeBytes?: number;
|
|
16
18
|
vmDiskUsedBytes?: number;
|
|
@@ -135,6 +135,19 @@ export async function collectMetrics(brainPath, brainId) {
|
|
|
135
135
|
catch {
|
|
136
136
|
// omit
|
|
137
137
|
}
|
|
138
|
+
// HEARTBEAT.md size + line count — see poller-brain#101. The *number of
|
|
139
|
+
// items* in the file is what drives the Step 8b sweep crash risk, so we
|
|
140
|
+
// report size + line count rather than a binary presence flag. Both omitted
|
|
141
|
+
// on any error (file missing or unreadable).
|
|
142
|
+
try {
|
|
143
|
+
const heartbeatPath = join(brainPath, 'HEARTBEAT.md');
|
|
144
|
+
const s = await stat(heartbeatPath);
|
|
145
|
+
payload.heartbeatMdBytes = s.size;
|
|
146
|
+
payload.heartbeatMdLines = await countLines(heartbeatPath);
|
|
147
|
+
}
|
|
148
|
+
catch {
|
|
149
|
+
// omit
|
|
150
|
+
}
|
|
138
151
|
// brain dir total size
|
|
139
152
|
try {
|
|
140
153
|
payload.brainDirBytes = await dirSizeBytes(brainPath);
|