server: Remove redundant whitespace in CPU log

This commit is contained in:
Elian Doran 2024-09-03 19:03:52 +03:00
parent 891621be69
commit 15a041a195
No known key found for this signature in database

View File

@ -59,9 +59,11 @@ async function startTrilium() {
log.info(JSON.stringify(appInfo, null, 2));
// for perf. issues it's good to know the rough configuration
const cpuInfos = (await import('os')).cpus();
if (cpuInfos && cpuInfos[0] !== undefined) { // https://github.com/zadam/trilium/pull/3957
log.info(`CPU model: ${cpuInfos[0].model}, logical cores: ${cpuInfos.length} freq: ${cpuInfos[0].speed} Mhz`); // for perf. issues it's good to know the rough configuration
const cpuModel = (cpuInfos[0].model || "").trimEnd();
log.info(`CPU model: ${cpuModel}, logical cores: ${cpuInfos.length}, freq: ${cpuInfos[0].speed} Mhz`);
}
const httpServer = startHttpServer();