Skip to content

Commit

Permalink
remove whitespace between CPU% and (val)
Browse files Browse the repository at this point in the history
  • Loading branch information
nklincoln committed Jan 30, 2020
1 parent 082f108 commit 5e0d6c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/caliper-core/lib/master/monitors/monitor-docker.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,8 @@ class MonitorDocker extends MonitorInterface {
watchItemStat.set('Name', container.name);
watchItemStat.set('Memory(max)', mem_stat.max);
watchItemStat.set('Memory(avg)', mem_stat.avg);
watchItemStat.set('CPU% (max)', cpu_stat.max.toFixed(2));
watchItemStat.set('CPU% (avg)', cpu_stat.avg.toFixed(2));
watchItemStat.set('CPU%(max)', cpu_stat.max.toFixed(2));
watchItemStat.set('CPU%(avg)', cpu_stat.avg.toFixed(2));
watchItemStat.set('Traffic In', (net.in[net.in.length - 1] - net.in[0]));
watchItemStat.set('Traffic Out', (net.out[net.out.length - 1] - net.out[0]));
watchItemStat.set('Disc Write', (disc.write[disc.write.length - 1] - disc.write[0]));
Expand Down
6 changes: 3 additions & 3 deletions packages/caliper-core/lib/master/monitors/monitor-process.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,15 +288,15 @@ class MonitorProcess extends MonitorInterface {
watchItemStat.set('Name', key);
watchItemStat.set('Memory(max)', MonitorUtilities.byteNormalize(mem_stat.max));
watchItemStat.set('Memory(avg)', MonitorUtilities.byteNormalize(mem_stat.avg));
watchItemStat.set('CPU% (max)', cpu_stat.max.toFixed(2));
watchItemStat.set('CPU% (avg)', cpu_stat.avg.toFixed(2));
watchItemStat.set('CPU%(max)', cpu_stat.max.toFixed(2));
watchItemStat.set('CPU%(avg)', cpu_stat.avg.toFixed(2));

// append return array
resourceStats.push(watchItemStat);
}

// Normalize the resource stats to a single unit
const normalizeStats = ['Memory(max)', 'Memory(avg)', 'CPU% (max)', 'CPU% (avg)'];
const normalizeStats = ['Memory(max)', 'Memory(avg)'];
for (const stat of normalizeStats) {
MonitorUtilities.normalizeStats(stat, resourceStats);
}
Expand Down

0 comments on commit 5e0d6c1

Please sign in to comment.