This commit is contained in:
1 parent
ceadf42048
commit
baea0cc85c
2 files changed
+43
-7
No files matched your search
@@ -759,10 +759,10 @@ INSERT INTO %s (
|
||||
if v.samples == 0 {
|
||||
continue
|
||||
}
|
||||
avgVcpu := float64(v.sumVcpu) / float64(v.samples)
|
||||
avgRam := float64(v.sumRam) / float64(v.samples)
|
||||
avgDisk := v.sumDisk / float64(v.samples)
|
||||
total := float64(totalSamples)
|
||||
avgVcpu := 0.0
|
||||
avgRam := 0.0
|
||||
avgDisk := 0.0
|
||||
avgPresent := 0.0
|
||||
tinPct := 0.0
|
||||
bronzePct := 0.0
|
||||
@@ -770,6 +770,9 @@ INSERT INTO %s (
|
||||
goldPct := 0.0
|
||||
if total > 0 {
|
||||
avgPresent = float64(v.samples) / total
|
||||
avgVcpu = avgPresent * float64(v.lastVcpu)
|
||||
avgRam = avgPresent * float64(v.lastRam)
|
||||
avgDisk = avgPresent * v.lastDisk
|
||||
}
|
||||
if v.samples > 0 {
|
||||
tinPct = float64(v.tinHits) * 100 / float64(v.samples)
|
||||
|
||||
Reference in new issue
Block a user