Welcome Guest, Not a member yet? Register   Sign In
Reactor Feature: Customizable Profiler Output needs testing.
#1

[eluser]kilishan[/eluser]
Hey all,

In the spirit of helping out with the 'little things' on the Reactor wish-list, I've worked up some core changes to the Profiler output. This solves a few things:

1) If you've read the comments in the Profiler class in the past, there were several mentions about 'we should move this to a view someday', and
2) allows us to have the fabled 'debug toolbar' that a number of other frameworks have (like symfony, kohana, etc), and
3) allows us to change the appearance and even functionality, to some extent, of the profiler to match whatever app we're building.

Granted, the third reason probably won't actually come into play, but if you're building a CMS and want the profiler to show up in a certain location, you can do that.

The code was based on concepts from https://github.com/michalsn/codeigniter-debug-toolbar, though all of the code was written from scratch, except for the javascript which I tweaked. Images are from the file, but encoded to base64 and included in the javascript so their aren't any dependencies. Which means the images probably won't show up in IE6.

You can find the full repo at: https://github.com/lonnieezell/codeigniter-reactor, but I've also attached just the changed files.

If you can take some time to try it out and let me know of any bugs or suggestions, that would be great. I'd like to get this tested out pretty good before it has a chance to be included in the official repo.
#2

[eluser]PoetaWD[/eluser]
WHOA !!!!

Pretty SWEET !!!

I was planning on working with this,.... but... dont have the time to.

It would be cool for u to add some FIREPHP support on it.... I already have my own version of profiler based on CI current profiler.

I will send a SS later
#3

[eluser]kilishan[/eluser]
[quote author="PoetaWD" date="1297822135"]WHOA !!!!

Pretty SWEET !!!

I was planning on working with this,.... but... dont have the time to.

It would be cool for u to add some FIREPHP support on it.... I already have my own version of profiler based on CI current profiler.

I will send a SS later[/quote]

Looking forward to seeing the screenshot!

Currently, it only supports the information that CodeIgniter is already pushing out, so a couple of the items (likes files and ajax) that the inspiration included, is not there. Nor is FirePHP support. Honestly, FirePHP is one of those things I haven't really started using yet. Could be since I use Chrome mostly nowadays.

Is FirePHP support something that could be easily accessed within a view? If so, then it could be easily incorporated into a customized view. The screenshot your seeing is a custom view. The default looks exactly like the current CI output.
#4

[eluser]kilishan[/eluser]
Did find 1 bug and one inconvenience factor in the code. Smile

Bug: Wouldn't play nice with Modular Extensions HMVC. That has been fixed.

Inconvenience: For creating custom skins, having the queries already run through the highlight_code() function made it a pain to work with. That's been temporarily commented out in Profiler.php.

I also realized that I forgot to include the updated language file in the zip, though it should be in github.

To see how far I could push the customization, I worked up a quick ParticleTree-esque look for it. See http://particletree.com/features/php-quick-profiler/ if you aren't familiar with it.

It's getting closer to something that's much more usable. and elegant, as far as the custom skin goes.
#5

[eluser]Basketcasesoftware[/eluser]
Cool. In use for it in load testing?
#6

[eluser]kilishan[/eluser]
[quote author="Basketcasesoftware" date="1297860465"]Cool. In use for it in load testing?[/quote]

I'm not sure what you are asking. Sorry.
#7

[eluser]Basketcasesoftware[/eluser]
Sorry about that. First constructive use I could think of for a code profiler. Don't know why.
I saw your project and thought to myself. 'Hey! That looks cool! Another tool. Can I come up with a practical use that would justify the download and install of this?'
#8

[eluser]kilishan[/eluser]
[quote author="Basketcasesoftware" date="1297868319"]Sorry about that. First constructive use I could think of for a code profiler. Don't know why.
I saw your project and thought to myself. 'Hey! That looks cool! Another tool. Can I come up with a practical use that would justify the download and install of this?'[/quote]

Ah! I understand now. No worries.

However, this is just a new presentation on the existing information that CI spits out when $this->output->enable_profiler(true) is run.

One thing I would love to see here is the addition of logging, so I'll have to look into that, but won't be today. Client's think I should work on their projects, too. Silly peeps. Smile
#9

[eluser]troy_mccormick[/eluser]
Just wanted to post to let you know I love this. Would be cool to extend it to read the log file(s) possibly...I may try to write something up and send a pull request.

Great work!!!
#10

[eluser]kilishan[/eluser]
@Troy_mccormick Thanks! I'm really enjoying using it today.

The logging would be a great addition to it. There's some logging methods that the original ParticleTree implements that I would love to have, but would required extending the logging class with some additional methods. At this, point, though, 1/2 tempted to see if I can get that in Reactor, too. Smile




Theme © iAndrew 2016 - Forum software by © MyBB