Using Python and want to get more detail from your app?
Assuming you've tinkered a bit with the demo,
let's take it for a little spin
Install the agent
After signup you will see a message telling you how to install the Graphdat agent
See our How To's page for more.
Check out your dashboard!
To confirm that the agent is running, go to your dashboard.
You should see some lines appearing (if not, wait a few seconds, if you still don't see anything then contact us).
When you first install the agent it will automatically begin providing basic, system level metrics to your dashboard.
Whenever you install the agent on a new machine, new lines will appear on your dashboard (yep, that easy!).
Now onto some Python action...
$ easy_install graphdat
Install the Graphdat Python extension
If you are using PIP, install with PIP. If you are using easy_install, upgrade to pip, or use easy_install.
PIP is our preferred method, some reading for you if you are wondering why.
Add two lines to your code
Just require the import graphdat module at the top of your file and wrap your WSGI application and the Graphdat SDK will automatically hook into web requests you receive, record response time information, and send it to your dashboard.
Let's try it out!
Copy the code you see on the right, save it to a file, then run it with python.
Next, browse to http://127.0.0.1:1337 and hit refresh a few times.
We see web requests!
If all is going to plan, the Request Count and Response Time graphs on your dashboard should now show the requests you just made.
In the upper right corner of the Response Time graph you can click the Zoom button to get a closer look
Once you zoom in, click on one of the peaks in the upper graph and you will see a drill down appear for that request which tells you the requests made at that point in time.
Click one of the routes in the lower left and you can see how this route performed over time.
That's handy! But let's take it a bit further...
Take a closer look
In most applications there are a handful of functions that you want to keep an eye on for performance (e.g. calls to databases, remote web calls, etc..)
Using the Graphdat SDK you can instrument your code easily using some helper functions to wrap your calls.
As before, copy the sample code on the right to a file and run it in python then, once again, browse to your page a few times.
In the example, if we have a sort opertation that we want to track how much time was spent
We are reading chunks from a string (another use case would be a file) and we want to know how long it is taking to read each iteration
Graphdat cleans up the open timers when the response is done, computes the times, does the summary and now you have the break down in your graphdat dashboard.
Dive into those requests
Just as above, zoom into your Response Time graph, click a peak in the top graph, then client the '/' route in the lower left.
Because the system now has data for your request it will show the breakdown as a stacked line and bar graph.
You can now watch the performance of these functions over time to look for trends as well is jump into slow running web calls whenever they happen.
That's the quick start!
For further information on how the Graphdat SDK works, you can view more details in the wiki article here.
Graphdat offers the easiest and most competitive pricing around. Because we believe that every application developer,
whether a solo warrior, or member of a large corporate team,
should have access to these powerful tools.