[xdebug-general] Re: profiler output filenames

From: Derick Rethans <derick[@]xdebug.org>
Date: Thu, 19 Apr 2007 14:50:56 +0200 (CEST)

Hello David,

On Wed, 18 Apr 2007, David Sklar wrote:

> Three things I've run into w/r/t output filenames from the profiler:
>
> 1. With profiler_output_name set to 'script' and with auto_prepend_file is
> set, the auto_prepend file is used for the output filename, not the main
> script being executed. I suppose this sort of makes sense, in a way, since
> it's the auto_prepend_file's op array that kicks things off, but if it was
> easy to change what is passed to xdebug_profiler_init() so that it reflected
> the actual script being executed, that would be swell.
>
> 2. Along those lines, I am working on a site where just about everything goes
> through a single PHP file, but then query string parameters or path info
> controls what happens. So it would be double-swell if there was a
> profiler_output_name option to use the request uri, not just the filename, for
> the cache output file.
>
> 3. Also handy (for requests that might come in very close to each other) would
> be something like xdebug_profiler_output=microtimestamp that would use
> gettimeofday() instead of time() and include the fractional piece to separate
> the output files.
>
> If there's interest in #3, I'll prepare a patch. If there's interest in #1 or
> #2 and someone can point me at where the necessary information can be found
> (current script filename and current request uri), I'll put together patches
> for those, too.

For 1... I would need to do some research as from the top of my head on
where to find this information. For 2 it is quite easy. Use a
zend_hash_find on the $_SERVER global for the request_uri parameter,
then md5 it and append it to the filename. I think 3 is also useful.

Please note however, that I will not be adding new features until after
I have released 2.0 - I need to work to a stable release at some point
:)

regards,
Derick

-- 
Xdebug | http://xdebug.org | xdebug-general@lists.xdebug.org
Received on Thu Apr 19 2007 - 14:51:04 BST

This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST