jimrubenstein / php-profiler Goto Github PK
View Code? Open in Web Editor NEWA php implementation of the Stack Exchange mvc-mini-profiler.
A php implementation of the Stack Exchange mvc-mini-profiler.
Hi,
Please don't use shorttag, not every hosting company enable this fonction.
Regards,
Julien
I get this error: Fatal error: Call to a member function sqlStart() on a non-object in /home/oil/public_html/includes/php-profiler/profiler.php on line 315
when running the following code on PHP 5.2.9:
require("php-profiler/profiler.php");
Profiler::enable();
$query = "SELECT * FROM `table`";
$queryProf = Profiler::sqlStart( $query );
// $dbi is a mysqli db connection, obviously.
$results = mysqli_query( $dbi, $query );
$queryProf->end();
Hi,
In profiler.php in line 421 (function calculateThreshold) :
self::$trivialThresholdMS = self::$childDurations[ floor(count(self::$childDurations) * self::$trivialThreshold) ];
If you have no child :
floor(count(self::$childDurations) * self::$trivialThreshold -> 0
So your code try to access : self::$childDurations[0], which give you a notice :
Notice: Undefined offset: 0 in [...]php-profiler/profiler.php on line 421
May be you can surround all the with an !empty(self::$childDurations) ...
Best regards,
Julien
When I click the SQL link in the popup, Chrome opens the details for a fraction of a second and than redirects the page to the # page.
I've noticed that profiler.php has Windows line endings, while README.md has Unix line endings. I'm hoping it wasn't me that caused it with my previous pull request!
I love this profiler and the unique thing I really miss is a debugger for variables.
Maybe you can create a method like this
<?php Profiler::debugVar('var_name', $var); ?>
And display in the result a table like this
var_name | value of the var
Just an idea :)
Greetings!
I m getting this following error when i run the demo
Non-static method Profiler::isTrivial() should not be called statically in /Users/Praveen/www/library/php-prof/profiler.php on line 1150
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.