Skip to content

Commit

Permalink
chore: rename var
Browse files Browse the repository at this point in the history
  • Loading branch information
david-luna committed Oct 18, 2023
1 parent dec0119 commit e3c4668
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/opentelemetry-host-metrics/src/stats/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ export function getCpuUsageData(): CpuUsageData[] {

const currentTime = Date.now();
const timeElapsed = currentTime - prevOsData.time;
const currentCpus = { time: currentTime, cpus: os.cpus() };
const currentOsData = { time: currentTime, cpus: os.cpus() };

const usageData = currentCpus.cpus.map((cpu, cpuNumber) => {
const usageData = currentOsData.cpus.map((cpu, cpuNumber) => {
const prevTimes = prevOsData.cpus[cpuNumber].times;
const currTimes = cpu.times;

Expand Down Expand Up @@ -86,7 +86,7 @@ export function getCpuUsageData(): CpuUsageData[] {
};
});

prevOsData = currentCpus;
prevOsData = currentOsData;

return usageData;
}
Expand Down

0 comments on commit e3c4668

Please sign in to comment.