From 20c7eccf1f9c7119474ae9598b495fb2c6c95aaf Mon Sep 17 00:00:00 2001 From: David Lyle Date: Fri, 30 Aug 2019 14:44:31 -0600 Subject: [PATCH] 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. --- metrics/report/report_dockerfile/tidy_scaling.R | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/metrics/report/report_dockerfile/tidy_scaling.R b/metrics/report/report_dockerfile/tidy_scaling.R index fadd9de..43105f8 100755 --- a/metrics/report/report_dockerfile/tidy_scaling.R +++ b/metrics/report/report_dockerfile/tidy_scaling.R @@ -135,15 +135,16 @@ for (currentdir in resultdirs) { cputotal = cputotal + cpuused } + num_pods = local_bootdata$n_pods[length(local_bootdata$n_pods)] # We get data in Kb, but want the graphs in Gb. memtotal = memtotal / (1024*1024) - gb_per_pod = memtotal/fdata$Config$NUM_PODS + gb_per_pod = memtotal/num_pods pod_per_gb = 1/gb_per_pod # Memory usage stats. local_mems = c( "Test"=testname, - "n"=fdata$Config$NUM_PODS, + "n"=num_pods, "Tot_Gb"=round(memtotal, 3), "avg_Gb"=round(gb_per_pod, 4), "n_per_Gb"=round(pod_per_gb, 2) @@ -153,16 +154,16 @@ for (currentdir in resultdirs) { # cpu usage stats local_cpus = c( "Test"=testname, - "n"=fdata$Config$NUM_PODS, + "n"=num_pods, "Tot_CPU"=round(cputotal, 3), - "avg_CPU"=round(cputotal/fdata$Config$NUM_PODS, 4) + "avg_CPU"=round(cputotal/num_pods, 4) ) cpustats=rbind(cpustats, local_cpus) # launch (boot) stats local_boots = c( "Test"=testname, - "n"=fdata$Config$NUM_PODS, + "n"=num_pods, "median"=median(na.omit(local_bootdata)$launch_time)/1000, "min"=min(na.omit(local_bootdata)$launch_time)/1000, "max"=max(na.omit(local_bootdata)$launch_time)/1000,