/[sudobot]/trunk/src/commands/settings/SystemCommand.ts
ViewVC logotype

Diff of /trunk/src/commands/settings/SystemCommand.ts

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 363 by rakin, Mon Jul 29 17:29:40 2024 UTC revision 364 by rakin, Mon Jul 29 17:29:48 2024 UTC
# Line 54  export default class SystemCommand exten Line 54  export default class SystemCommand exten
54              apiLatencyIcon = '🟡';              apiLatencyIcon = '🟡';
55          }          }
56    
57          const memoryFree = Math.round((process.memoryUsage().heapUsed / 1024 / 1024 * 100) / 100);          const memoryTotal = Math.round(process.memoryUsage().heapTotal / 1024 / 1024);
58            const memoryUsed = Math.round(process.memoryUsage().heapUsed / 1024 / 1024);
59    
60          const msgoptions: any = {          const msgoptions: any = {
61              embeds: [              embeds: [
# Line 85  export default class SystemCommand exten Line 86  export default class SystemCommand exten
86                          value: `${apiLatencyIcon} ${apiLatency}ms`                          value: `${apiLatencyIcon} ${apiLatency}ms`
87                      },                      },
88                      {                      {
89                          name: 'Available Memory',                          name: 'Memory Usage',
90                          value: `${1024 - memoryFree}MB / 1.0GB`                          value: `${memoryUsed} MB / ${memoryTotal} MB`
91                      },                      },
92                      {                      {
93                          name: 'System Platform',                          name: 'System Platform',

Legend:
Removed from v.363  
changed lines
  Added in v.364

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26