Skip to content

Commit 3853ce8

Browse files
committed
reword logging statement
1 parent b0976b3 commit 3853ce8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/core/src/shared/utilities/processUtils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export interface ProcessStats {
6868
cpu: number
6969
}
7070
export class ChildProcessTracker {
71-
static readonly pollingInterval: number = 10000
71+
static readonly pollingInterval: number = 10000 // Check usage every 10 seconds
7272
static readonly thresholds: ProcessStats = {
7373
memory: 100 * 1024 * 1024, // 100 MB
7474
cpu: 50,
@@ -106,7 +106,7 @@ export class ChildProcessTracker {
106106
}
107107
const stats = await this.getUsage(pid)
108108
if (stats) {
109-
ChildProcessTracker.logger.debug(`stats for ${pid}: %O`, stats)
109+
ChildProcessTracker.logger.debug(`Process ${pid} usage: %O`, stats)
110110
if (stats.memory > ChildProcessTracker.thresholds.memory) {
111111
ChildProcessTracker.logger.warn(`Process ${pid} exceeded memory threshold: ${stats.memory}`)
112112
}
@@ -127,7 +127,7 @@ export class ChildProcessTracker {
127127
this.#pids.delete(childProcessId)
128128
}
129129

130-
public size() {
130+
public get size() {
131131
return this.#pids.size
132132
}
133133

@@ -271,7 +271,7 @@ export class ChildProcess {
271271
const args = this.#args.concat(options.extraArgs ?? [])
272272

273273
const debugDetail = this.#log.logLevelEnabled('debug')
274-
? ` (running processes: ${ChildProcess.#runningProcesses.size()})`
274+
? ` (running processes: ${ChildProcess.#runningProcesses.size})`
275275
: ''
276276
this.#log.info(`Command: ${this.toString(options.logging === 'noparams')}${debugDetail}`)
277277

0 commit comments

Comments
 (0)