Further CPU Experimental Changes
This commit is contained in:
@@ -11,6 +11,7 @@ import path from 'path'
|
||||
import os from 'os'
|
||||
import { CollectorPlugin } from './plugin.js'
|
||||
import { registerChart } from '../../../shared/metrics.js'
|
||||
import { readFileBuf } from '../../utils/fd-cache.js'
|
||||
import logger from '../../utils/logger.js'
|
||||
|
||||
const log = logger.child('fs-stats')
|
||||
@@ -23,11 +24,7 @@ export function isFsStatsEnabled() {
|
||||
}
|
||||
|
||||
function readFile(p) {
|
||||
try {
|
||||
return fs.readFileSync(p, 'utf8')
|
||||
} catch {
|
||||
return null
|
||||
}
|
||||
return readFileBuf(p)
|
||||
}
|
||||
|
||||
function readNum(p) {
|
||||
|
||||
Reference in New Issue
Block a user