My favorites | Sign in
Project Hosting will be READ-ONLY Thursday at 3:00pm UTC for up to 3 hours for network maintenance.
Project Home Downloads Wiki Issues Source
Project Information
Members
Links

Last year when we had a memory eating web app, we started a tool to basically watch the memory and the CPU, we called it xray. You can see a couple of screenshots in those slides here http://www.slideshare.net/nonken/dojo-and-adobe-air-presentation (after slide 17). We hadn’t released anything yet, simply because … we are developers, we never get anything done enough to be confident enough to release it :-) .

On the screenshots you can see the graphs for the memory and CPU load for any browser, additionally the web app can send events which are then mapped into the graph so you can see which event has what effect on the CPU or memory. The graphing app is an AIR app communicating with the web app to retreive the events. An external AIR app to not blur the actual browser stats. We thought about integrating dtrace into it and some other ideas of course.

taken from: http://benzilla.galbraiths.org/2009/03/23/memory-tools-and-you/#comment-3443

xRay quickstart

Run xray

Currently xray only runs under Mac OS X, but if you want to contribute feel free to modify this line in the code and it should also be running on other unix style systems. Windows might be a little more work, I can't tell.

You need:

  • Python (I think it is 2.5)
  • Adobe AIR SDK (which contains also the adl executable)

To see something:

  • cd bin and then ./server.py to run the server that collects the data the graph will show (Note: you can only stop this by closing the terminal :-( got a fix? send it in)
  • open another shell and start the AIR application that visualizes the data like so cd client and run adl xray-app.xml (Note: at start up it shows a warning click "Dismiss all", some code is doing a new Function somewhere)

Sending data to the xray client

Note: xRay uses google gears to give you more precise logging capabilities. That way you can be sure that sending off large amounts of data will not affect your applications performance.

This feature currently is still in a very early development stage so be aware that api's can and most probably will change. If you want to get a glimps of what currently is possible, open up the index.html in the debug folder. Following function to log messages are currently supported by the xRay client:

  • xray.log(msg, type, id);
  • At this point is is most useful to just use the msg parameter. All other parameters are not yet recognized by the xRay client. Note that the function xray.log only queues the message in a google gears worker thread. Once you have collected enough info/data, use the xray.send() function to send the information off to the xRay client.
  • xray.send();
  • Sends the queued data off to the xRay client

xRay bookmarklet

xRay already features a very simple bookmarklet which you can find in the index.html within the debug folder.

Make sure that you adjust the bookmarklet code to point to a valid xray.js

Currently the bookmarklet supports xray.log() and xray.send()

Powered by Google Project Hosting