Posted in ColdFusion | Posted on 10-24-2005 | 7,649 views
So a few days ago I blogged about my new project, Starfish. Starfish is essentially a ColdFusion debugger that doesn't display information, but rather stores it in the Server scope. You can then display a report on this data in the CF Admin. I'm now happy to report that the initial version is ready for download.
Some BIG WARNINGS - This code is ugly. I'm not kidding. I know that some people have told me they have learned a lot from downloading my code and looking at it. Don't do that. Avoid the code like the plague. Ok, so it's not that bad, but it was written very quickly. I'd call this version more a Proof of Concept than a real application.
That being said - I'd love feedback on it. I've set up a forum for the project, so please use it for your ideas. Also, I've finally gotten around to creating a "Projects" site. You can see the Starfish project here:
http://www.coldfusionjedi.com/projects/starfish
All of my projects will have a page like this - as I get around to it. As always, if you like this, visit my wishlist. (I'm still waiting for someone to pick up the Nano - what's wrong you people - too cheap?!?! ;)
Edited: Oops - so I forgot to mention. The zip has NO instructions. Here are some simple instructions for now:
Unpack the zip. profiler.cfm goes in cfusionmx7\wwwroot\web-inf\debug In your cf admin, turn on debugging and select the template. Take the other files and place them in:
webroot\CFIDE\administrator\profiler
Add this line to extensionscustom.cfm in your cf admin folder:
<a href="profiler/index.cfm" target="content">Profiler</a><br>


Of course, you notice that I never have any complaints about your code, so that's saying something!
Bill: True. Although the reporting could be changed to work in CFMX.
:-)
This is a helpfull little widget in the admin! Now I have an idea how the admin is setup as well :-) Good stuff to know how to modify it...
Thanks!
Custom Extensions-> Profiler, which I'm assuming from the previously provided screen shot is what this is referring to.
It says "Sorry, but there is no profiling data at this time."
I created extensionscustom.cfm in...AH HA!I failed to RTFI closely and put it in C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\CFIDE\administrator\debugging instead of
C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\debug . Let's try it now...
OK now at least I get an error..
"Attribute validation error for tag CFFORMITEM.
The value of the attribute TYPE, which is currently "script", must be one of the values: HRULE,HTML,TEXT,VRULE,SPACER."
Oh well SimonH AND Jared are around here somewhere, maybe one of them can apply their vast intellect to fixing it...
The value of the attribute TYPE, which is currently "script", must be one of the values: HRULE,HTML,TEXT,VRULE,SPACER."
Oh well SimonH AND Jared are around here somewhere, maybe one of them can apply their vast intellect to fixing it...
You need to have the 7.0.1 updater installed
And as long as the client is on 7.0 I have to be on 7.0 also, not 7.x. I don't want to deploy the app into production and have it break.
Add a file called extensionscustom.cfm under CFIDE\administrator\
Add the following code in the file:
<a href="profiler/index.cfm" target="content">Profiler</a><br>
Restart the CF Server and you should see a Menu Item called "Custom Extensions" and Profiler is a link under that.
Now.. I have a question... Once I got that to work I click on the Profiler link and this is what I see on my Content side.
"Sorry, but there is no profiling data at this time." Ray Please help me....
Thanks
Needed some help. Ran through the directions and comments. We have 7.01.
Steps:
1. Copied profiler.cfm to cfusionmx7\wwwroot\web-inf\debug. It shows up in the debug template list.
2. Went to CFIDE\administrator, no profiler directory, created one. Placed the rest of the zip files in here.
3. Went to CFIDE\administrator, added extensionscustom.cfm with the necessary text. Saw a comment to try, CFIDE\administrator\debugging. Did the same here.
Still no go. I dont see the extra menu item created in CFAdmin. What did I do wrong?
-Sami
Dont see the menu item in CFAdmin, but I did go to http://xyz/cfide/administrator/profiler, and it came up.
Hopefully we'll get some step by step instructions. Looks very useful though!
-Sami
Question / suggestion: It looks like this is only capturing debug information for requests served to IP's listed in the debug IP list, correct? Is this possible to enable for all IP addresses?
I only ask because this would be a great profiler for a server. Let it run for 20 minutes, and see what apps are being hit the hardest, find performance bottlenecks, etc. Very awesome code, thanks for all your effort!
- Justice
I wonder if there is a way to add a wild card temporarily to the admin debug IP list so I can gather data for my entire server?
In the Query view tab, show me some way to see what template the query was called from, and possibly the same thing in the .cfc's tab?
Dont get me wrong, not expecting any response or code change's, I am just trying to provide (hopefully) constructive feedback and idea's!
Very groovy tool though, it will help me find bottle necks much faster.
Thanks Ray
1. In the profiler... a refresh button. (I am sure there are those who don't know to click on the sidebar to get an update.)
2. If it were possible to collect application specific... or narrow down to just items in a directory and subdirectories that would be great!)
3. Profiling a time period option.
4. The time for min time and max time should be on same numeric scale.
5. The ability to store the details in a database for data minning!
6. Knowing where a query was called from would be great.
7. there is a danger in caching the queries... like for a user login the password can be stored. Or in a financial transaction a credit card number could be stored... so this would be a security issue to think through very carefully. Perhaps you should have an option to turn on query caching rather than storing the SQL by default. That would reduce the danger to some degree.
8. Query number of records would be nice also.
9. The ability to trim off the "web root" directories would be nice... it's hard to read long directory names.
10. Ability to clear the store. (Reset or whatever)
=)
You can always create new JRun server instances and run different versions of CFMX on each.
This allows you to check your code on 7.0 and 7.0.1 side-by-side (and of course now CHF1 for 7.0.1).
500 Element VALUE is undefined in a CFML structure referenced as part of an expression.
Element VALUE is undefined in a CFML structure referenced as part of an expression.
Running CF 7.01
I did a dump on #attr# right before the loop that calls for VALUE (on line 36 in profiler.cfm) and the struct only has sqlType, Type, and variable.
This is from this stored proc call
<cfstoredproc procedure="getDateTime" datasource="#dsn#">
<cfprocparam type="Out" cfsqltype="CF_SQL_TIMESTAMP" variable="currentDateTime" null="No">
</cfstoredproc>
Thoughts?
I've ColdFusion MX 7,0,1,116466 installed on IIS 5 with w2k server, but don't show chart (it's empty!).
Why?
http://ray.camdenfamily.com/projects/starfish/
[Add Comment] [Subscribe to Comments]