Explorar o código

fix total memory

walkor %!s(int64=2) %!d(string=hai) anos
pai
achega
a2d7b5bc1b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Worker.php

+ 1 - 1
src/Worker.php

@@ -1099,7 +1099,7 @@ class Worker
                 $pid = $pidMath[0];
                 $dataWaitingSort[$pid] = $value;
                 if (preg_match('/^\S+?\s+?(\S+?)\s+?(\S+?)\s+?(\S+?)\s+?(\S+?)\s+?(\S+?)\s+?(\S+?)\s+?(\S+?)\s+?/', $value, $match)) {
-                    $totalMemory += (int)str_ireplace('M', '', $match[1]);
+                    $totalMemory += (float)str_ireplace('M', '', $match[1]);
                     $maxLen1 = max($maxLen1, strlen($match[2]));
                     $maxLen2 = max($maxLen2, strlen($match[3]));
                     $totalConnections += (int)$match[4];