CodeExplorer getPeakMemoryUsage example
$this->
dumpProfile(sprintf('%s==>%s',
$parent,
$name),
$p,
$data);
$this->
dumpChildren($name,
$p,
$data);
} } private function dumpProfile(string
$edge, Profile
$profile, &
$data) { if (isset($data[$edge])) { ++
$data[$edge]['ct'
];
$data[$edge]['wt'
] +=
floor($profile->
getDuration() * 1000000
);
$data[$edge]['mu'
] +=
$profile->
getMemoryUsage();
$data[$edge]['pmu'
] +=
$profile->
getPeakMemoryUsage();
} else { $data[$edge] =
[ 'ct' => 1,
'wt' =>
floor($profile->
getDuration() * 1000000
),
'mu' =>
$profile->
getMemoryUsage(),
'pmu' =>
$profile->
getPeakMemoryUsage(),
];
} }}