You are here

function save_memory_usage in Coder 7.2

Same name and namespace in other branches
  1. 7 coder_upgrade/scripts/coder_upgrade.run.php \save_memory_usage()

Saves memory usage for printing later.

Parameters

string $step: A string describing the code step when the memory usage is gathered.

Return value

mixed String or array of command line arguments.

1 call to save_memory_usage()
coder_upgrade.run.php in coder_upgrade/scripts/coder_upgrade.run.php

File

coder_upgrade/scripts/coder_upgrade.run.php, line 188

Code

function save_memory_usage($step, &$usage) {
  $usage[] = $step;
  $usage[] = 'Peak: ' . number_format(memory_get_peak_usage(TRUE), 0, '.', ',') . ' bytes';
  $usage[] = 'Curr: ' . number_format(memory_get_usage(TRUE), 0, '.', ',') . ' bytes';
  $usage[] = '';
  $usage[] = '';
}