Refactorng
This commit is contained in:
parent
865fd25af1
commit
aa4ef6745a
132 changed files with 180 additions and 212 deletions
16
src/misc/machineInfo.ts
Normal file
16
src/misc/machineInfo.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import * as os from 'os';
|
||||
import Logger from './logger';
|
||||
|
||||
export default class {
|
||||
public static show(): void {
|
||||
const totalmem = (os.totalmem() / 1024 / 1024 / 1024).toFixed(1);
|
||||
const freemem = (os.freemem() / 1024 / 1024 / 1024).toFixed(1);
|
||||
const logger = new Logger('Machine');
|
||||
logger.info(`Hostname: ${os.hostname()}`);
|
||||
logger.info(`Platform: ${process.platform}`);
|
||||
logger.info(`Architecture: ${process.arch}`);
|
||||
logger.info(`Node.js: ${process.version}`);
|
||||
logger.info(`CPU: ${os.cpus().length}core`);
|
||||
logger.info(`MEM: ${totalmem}GB (available: ${freemem}GB)`);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue