Skip to content

Commit

Permalink
Removed temporary profiling code
Browse files Browse the repository at this point in the history
  • Loading branch information
convenient committed Aug 2, 2015
1 parent 9f0c1dd commit cb4a42b
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions app/code/Magento/CatalogImportExport/Model/Export/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -768,17 +768,6 @@ protected function paginateCollection($page, $pageSize)
*/
public function export()
{
$shouldProfile = false;
if (extension_loaded('xhprof')) {
$xhprofRoot = "/lukerodgers.co.uk/builds/xhprof";
if (is_dir($xhprofRoot)) {
$shouldProfile = true;
require_once $xhprofRoot . "/xhprof_lib/utils/xhprof_lib.php";
require_once $xhprofRoot . "/xhprof_lib/utils/xhprof_runs.php";
xhprof_enable();
}
}

//Execution time may be very long
set_time_limit(0);

Expand All @@ -805,18 +794,7 @@ public function export()
break;
}
}

$contents = $writer->getContents();
if ($shouldProfile) {
$uri = date("y-m-d-h-i-s")."-".$_SERVER['SERVER_ADDR']."-".$_SERVER['REQUEST_URI'];
$uri = preg_replace('#[^0-9a-z]+#i', '-', $uri);
$uri = strtolower($uri);
$uri = trim($uri, '-');
$xhprof_data = xhprof_disable();
$xhprof_runs = new \XHProfRuns_Default();
$xhprof_runs->save_run($xhprof_data, $uri);
}
return $contents;
return $writer->getContents();
}

/**
Expand Down

0 comments on commit cb4a42b

Please sign in to comment.