-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Profile multiple runs on the same script - document rules of aggregation/skipping #274
Comments
maxgalbu
changed the title
Document all teh rules of aggregation
Document all the rules of aggregation
Aug 8, 2019
maxgalbu
changed the title
Document all the rules of aggregation
Profile multiple runs on the same script - document rules of aggregation/skipping
Aug 8, 2019
Found it: //THIS LINE
$data['_id'] = new \MongoId();
$data['profile'] = xhprof_disable();
$data['meta'] = array(
'url' => $uri,
'SERVER' => $_SERVER,
'get' => $_GET,
'env' => $_ENV,
'simple_url' => \Xhgui_Util::simpleUrl($uri),
'request_ts' => time(),
'request_ts_micro' => time() * 1000,
'request_date' => date('Y-m-d', time()),
);
try {
$config = \Xhgui_Config::all();
$saver = \Xhgui_Saver::factory($config);
$saver->save($data);
} catch (\Exception $e) {
error_log('xhgui - ' . $e->getMessage());
} |
I had a very similar question: |
https://github.com/perftools/php-profiler#advanced-usage: /** @var \Xhgui\Profiler\Profiler $profiler */
// start profiling
$profiler->enable($flags, $options);
// run program
foo();
// stop profiler
$profiler_data = $profiler->disable();
// send $profiler_data to saver
$profiler->save($profiler_data); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With an always-running PHP (while(true)) script and profiler.enable set to return true to profile all runs, the xhgui-collector still doesn't collect all the runs. Is there any way to collect multiple runs for the same script? What are the rules to avoid aggregation/skipping of runs?
The text was updated successfully, but these errors were encountered: