Code Monkey home page Code Monkey logo

php-profiler's People

Contributors

jamesmoss avatar jimmysawczuk avatar jimrubenstein avatar lazyshot avatar trevyn avatar wasigh avatar youshaaleayoub avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

php-profiler's Issues

Short tag

Hi,

Please don't use shorttag, not every hosting company enable this fonction.

Regards,
Julien

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

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();

calculateThreshold if no child

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

Inconsistant Line Endings

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!

[Req] Add a method to debug

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!

call to non-static method

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.