Skip to content

Commit 20c7ecc

Browse files
dklyleobedmr
authored andcommitted
Fixing number of pods in report
In the rewrite of the report generation code, we regressed to using the passed in requested number of pods rather than the actual. Since we typically attempt to launch more pods than the system is capable of, the math for the stats are done incorrectly and misreported. This changes the behavior back to using the correct value of the total number of pods launched.
1 parent be16414 commit 20c7ecc

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

metrics/report/report_dockerfile/tidy_scaling.R

+6-5
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,16 @@ for (currentdir in resultdirs) {
135135
cputotal = cputotal + cpuused
136136
}
137137

138+
num_pods = local_bootdata$n_pods[length(local_bootdata$n_pods)]
138139
# We get data in Kb, but want the graphs in Gb.
139140
memtotal = memtotal / (1024*1024)
140-
gb_per_pod = memtotal/fdata$Config$NUM_PODS
141+
gb_per_pod = memtotal/num_pods
141142
pod_per_gb = 1/gb_per_pod
142143

143144
# Memory usage stats.
144145
local_mems = c(
145146
"Test"=testname,
146-
"n"=fdata$Config$NUM_PODS,
147+
"n"=num_pods,
147148
"Tot_Gb"=round(memtotal, 3),
148149
"avg_Gb"=round(gb_per_pod, 4),
149150
"n_per_Gb"=round(pod_per_gb, 2)
@@ -153,16 +154,16 @@ for (currentdir in resultdirs) {
153154
# cpu usage stats
154155
local_cpus = c(
155156
"Test"=testname,
156-
"n"=fdata$Config$NUM_PODS,
157+
"n"=num_pods,
157158
"Tot_CPU"=round(cputotal, 3),
158-
"avg_CPU"=round(cputotal/fdata$Config$NUM_PODS, 4)
159+
"avg_CPU"=round(cputotal/num_pods, 4)
159160
)
160161
cpustats=rbind(cpustats, local_cpus)
161162

162163
# launch (boot) stats
163164
local_boots = c(
164165
"Test"=testname,
165-
"n"=fdata$Config$NUM_PODS,
166+
"n"=num_pods,
166167
"median"=median(na.omit(local_bootdata)$launch_time)/1000,
167168
"min"=min(na.omit(local_bootdata)$launch_time)/1000,
168169
"max"=max(na.omit(local_bootdata)$launch_time)/1000,

0 commit comments

Comments
 (0)