Skip to content

Commit

Permalink
fix: add a comment to calculation of cpu usage
Browse files Browse the repository at this point in the history
  • Loading branch information
krosy1337 committed Oct 6, 2023
1 parent ac083ef commit 56ebd8a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/store/reducers/tenants/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ export const calculateTenantMetrics = (tenant?: TTenant) => {
const memory = isNumeric(MemoryUsed) ? Number(MemoryUsed) : undefined;
const storage = isNumeric(StorageAllocatedSize) ? Number(StorageAllocatedSize) : undefined;

// We use system pool usage and user pool usage to calculate cpu usage because
// only these pools directly indicate resources available to perform user queries
const cpuUsage =
isNumeric(systemPoolUsage) || isNumeric(userPoolUsage)
? Math.max(Number(systemPoolUsage), Number(userPoolUsage)) * 100
Expand Down

0 comments on commit 56ebd8a

Please sign in to comment.