Skip to content

Commit

Permalink
Fix: Increase kubernetes cpu/mem usage scale (gethomepage#2453)
Browse files Browse the repository at this point in the history
  • Loading branch information
shamoon authored Dec 10, 2023
1 parent 49281b3 commit d855e2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/api/kubernetes/stats/[...service].js
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ export default async function handler(req, res) {
});
stats.cpuLimit = cpuLimit;
stats.memLimit = memLimit;
stats.cpuUsage = cpuLimit ? stats.cpu / cpuLimit : 0;
stats.memUsage = memLimit ? stats.mem / memLimit : 0;
stats.cpuUsage = cpuLimit ? 100 * (stats.cpu / cpuLimit) : 0;
stats.memUsage = memLimit ? 100 * (stats.mem / memLimit) : 0;
res.status(200).json({
stats,
});
Expand Down

0 comments on commit d855e2b

Please sign in to comment.