getData(); if ($run) { return '• XHProf'; } return 'XHProf'; } public function getDescription() { return 'Provides detailed PHP profiling information through XHProf.'; } public function generateData() { return $this->xhprofID; } public function getXHProfRunID() { return $this->xhprofID; } public function render() { if (!DarkConsoleXHProfPluginAPI::isProfilerAvailable()) { return '
The "xhprof" PHP extension is not available. Install xhprof '. 'to enable the XHProf plugin.'; } $run = $this->getXHProfRunID(); if ($run) { return 'View Run'; } else { $hidden = array(); $data = array('__profile__' => 'page') + $_GET; foreach ($data as $k => $v) { $hidden[] = phutil_render_tag( 'input', array( 'type' => 'hidden', 'name' => $k, 'value' => $v, )); } $hidden = implode("\n", $hidden); return '
'; } } public function willShutdown() { if (isset($_REQUEST['__profile__']) && $_REQUEST['__profile__'] != 'all') { $this->xhprofID = DarkConsoleXHProfPluginAPI::stopProfiler(); } } } /* public function render() { $run = $this->getData(); if ($run) { $uri = 'http://www.intern.facebook.com/intern/phprof/?run='.$run; return