code: public function updatePeakMemory()
      {
          if (is_null($this->peak_memory)
              || (int) $this->peak_memory < memory_get_peak_usage()) {
              $this->peak_memory = memory_get_peak_usage();
          }
      }
docs: [[@doctodo method_description:updatePeakMemory]].