google-code-backups / xdebugtoolkit

Automatically exported from code.google.com/p/xdebugtoolkit
0 stars 0 forks source link

Add xdebug cost compensation #13

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Xdebug skewes frequent low-cost calls. So cg2dot could reduce aggregated
calls' time by n*f(global_min) where f is an empirical function that will
be likely identity at first and global_min is a minimal self time among all
calls. This way we can partially eliminate xdebug effect.

Original issue reported on code.google.com by Alexey.K...@gmail.com on 24 Mar 2010 at 5:05

GoogleCodeExporter commented 8 years ago
An example:
if we initially had:
mysql_real_escape_string() = 5 x [5..8ms] = 33ms
mysql_query() = 1 x [500ms] = 500ms
mysql_fetch_row() = 10 x [5..20] = 100ms
strlen() = 1000 x [2..3ms] = 2500ms (frequent low-cast calls)

after applying the method we could estimate global_min as 2ms
and subtract it from all off the calls leading us to these results:

mysql_real_escape_string() = 5 x [3..6ms] = 23ms
mysql_query() = 1 x [498ms] = 498ms
mysql_fetch_row() = 10 x [3..18] = 80ms
strlen() = 1000 x [0..1ms] = 500ms

Original comment by Alexey.K...@gmail.com on 23 Apr 2010 at 10:32

GoogleCodeExporter commented 8 years ago

Original comment by Alexey.K...@gmail.com on 27 Dec 2010 at 8:17