+ Reply to Thread
Results 1 to 2 of 2

Thread: PHP Profiler

  1. #1
    masshuu's Avatar
    masshuu is offline Head of the Geese masshuu has a spectacular aura about
    Join Date
    Oct 2007
    Location
    Las Colinas, Tx
    Posts
    2,262

    PHP Profiler

    So I'm bored, and i decided to make a php profiler for people wno want to know why there site is slow or they keep getting suspended for resource usage.


    Right now you need to manually add the line tags and such, but i plan to make another script that parses the php file and modify it to add the needed lines of code.

    So first example:
    http://srg.x10hosting.com/test/test.php.without

    well what could possibly be wrong with that
    well after i apply my lines(which will be automatically added by said un-started script parser)
    http://srg.x10hosting.com/test/test.php.with

    After thats run, we get 3 files:
    http://srg.x10hosting.com/test/Warnings.txt
    http://srg.x10hosting.com/test/CallStack.txt
    http://srg.x10hosting.com/test/PHP_ProfileLog.txt

    Quick note: CallStack and PHP_ProfileLog have been shortened since they were originally 16000 lines, and several MB in size

    so with the warnings, we can see several problems, and in the future, the callstack file will also contain variables on that line, for the new value of whatever the value of it is(ie $t = pow($i,10);//$t = 10 )

    This is the current values that generate warnings:
    PHP Code:
    //These define when to give warnings
    // 10 kb
    define("LOOP_MEMUSE"10 1024true);
    // 1 second
    define("LOOP_TIME"1true);
    // 5000 Iterations
    define("LOOP_IterateCount"5000true);
    // 1 kb
    define("JUMP_MEMUSE"1024true);
    // .1 milisecond
    define("JUMP_TIME"0.0001true); 
    any tips, comments, suggestions on what i should do(i'm still not done, but i'm wondering what others think of it)
    Just leading the flock.
    Livewire
    Masshuu ------ carl6969
    descalzo ------------------- Smith6612
    Bryon--------------------------------- Corey
    If you find any post helpful or useful, duck
    \ / This for that post and rep it up.

  2. #2
    buyphiten is offline x10Hosting Member buyphiten is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    56

    Re: PHP Profiler

    im not sure about yr script... but does having a better script really helps a lot in saving resource usage?
    because so far i did not get warning at my current host and x10.

    but previously when i was with vodahost, i got suspended for 3 times. i remodify the script but it still trigger the r.usage. so im thinking if the host allows up to 25%, its difficult to trigger it right? to my knowledge, voda only allow 5%.
    Me

+ Reply to Thread

Similar Threads

  1. Ever Been Suspended For Using PHP?
    By dragoneye_xp in forum Off Topic
    Replies: 26
    Last Post: 08-16-2009, 07:17 PM
  2. [PHP] Variables in PHP
    By Bryon in forum Tutorials
    Replies: 15
    Last Post: 01-29-2009, 09:46 AM
  3. currently have an application pending php
    By biomasti in forum Free Hosting
    Replies: 1
    Last Post: 09-03-2008, 01:58 PM
  4. php errors galore
    By DMG Online in forum Scripts & 3rd Party Apps
    Replies: 9
    Last Post: 05-17-2008, 06:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers