Skip to content

Commit cb4a42b

Browse files
committed
Removed temporary profiling code
1 parent 9f0c1dd commit cb4a42b

File tree

1 file changed

+1
-23
lines changed
  • app/code/Magento/CatalogImportExport/Model/Export

1 file changed

+1
-23
lines changed

app/code/Magento/CatalogImportExport/Model/Export/Product.php

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -768,17 +768,6 @@ protected function paginateCollection($page, $pageSize)
768768
*/
769769
public function export()
770770
{
771-
$shouldProfile = false;
772-
if (extension_loaded('xhprof')) {
773-
$xhprofRoot = "/lukerodgers.co.uk/builds/xhprof";
774-
if (is_dir($xhprofRoot)) {
775-
$shouldProfile = true;
776-
require_once $xhprofRoot . "/xhprof_lib/utils/xhprof_lib.php";
777-
require_once $xhprofRoot . "/xhprof_lib/utils/xhprof_runs.php";
778-
xhprof_enable();
779-
}
780-
}
781-
782771
//Execution time may be very long
783772
set_time_limit(0);
784773

@@ -805,18 +794,7 @@ public function export()
805794
break;
806795
}
807796
}
808-
809-
$contents = $writer->getContents();
810-
if ($shouldProfile) {
811-
$uri = date("y-m-d-h-i-s")."-".$_SERVER['SERVER_ADDR']."-".$_SERVER['REQUEST_URI'];
812-
$uri = preg_replace('#[^0-9a-z]+#i', '-', $uri);
813-
$uri = strtolower($uri);
814-
$uri = trim($uri, '-');
815-
$xhprof_data = xhprof_disable();
816-
$xhprof_runs = new \XHProfRuns_Default();
817-
$xhprof_runs->save_run($xhprof_data, $uri);
818-
}
819-
return $contents;
797+
return $writer->getContents();
820798
}
821799

822800
/**

0 commit comments

Comments
 (0)