Numbers You Care About
February 24 2009, 3:11pm
One of the key features I love about Dash is collecting the numbers I care about. I tend to work on lower level portions of the systems here at FiveRuns and one of the daemons I wrote is the Loader daemon which takes the payloads uploaded to Dash and stuffs them into the database. To this end, I’m really only concerned about two numbers:
How many payloads did the system load in the last minute? (aka Loaded Payloads) How long did this take? (aka Load Time)
Recently I tuned the common path for the Loader and deployed it. Since we use Dash to track itself, I could see the resulting change to the load times almost immediately. A shiny nickel if you can figure out when I deployed the change.
What’s great about this is it is independent of any ORM library or framework. You don’t need to run Rails or even ActiveRecord. I could switch the Loader to use DataMapper tomorrow and my numbers will continue to work perfectly. Getting that number took one line of Ruby:
recipe.time :total_time, 'Load Time', :method => 'Loader::Engine#load'
That line just tells Dash to track the amount of time the process spends in the load method. This notion of user-configurable metrics is the fundamental power of Dash: you can specify the few critical numbers you need to know to do your job, without the extraneous fluff.

- Tags:
- Rails
Via: http://blog.fiveruns.com/2009/2/24/tracking-application-health

