Simple example of how easy it is to jam numbers into InfluxDB and graph something with Grafana. I choose to use Travis as a source of historical time-series data.
Get InfluxDB installed with Homebrew
$ brew install influxdb
$ influxdb -config=/usr/local/etc/influxdb.conf
This might be a good time to just work through the InfluxDB getting started docs, just for some context.
Get the gem dependencies installed
$ gem install influxdb travis
And grab a copy Grafana and extract is somewhere where it can be served up via HTTP... Or just use heel.
Use the InfluxDB console (http://localhost:8083/) to create a travis-builds
database, and then simply run:
$ ruby travis-times.rb
It will simple iterate over the travis builds for Rails as far back as it can and pump the values into InfluxDB.
First use the InfluxDB interface to have a look your data - http://localhost:8083/ - where you can also delete the invalid build times:
DELETE FROM trails_rails WHERE time = 0
The influxdb ui tries to show some graphs, but Grafana would do better...
Once Grafana is extracted, copy config.sample.js
to config.js
, uncomment and fix the first section related to InfluxDB and open it up in a browser.
You should get a default screen with some help tips, but no graphs.
Next up, you can easily add a graph with the mean/median build times of the Rails project for the length of time for which you have metrics. You could also start playing with more queries to see what else is useful.
The main idea is to show just how low the barriers to entry are.
Go forth and measure stuff, and use real hard data to make decisions!