hacking on graphs 2.0 is fun and easy

Interested in adding features/fixing bugs/using your own data with perf-o-matic 2.0? It's easy!

git clone git://github.com/rhelmer/graphs.git

open graphs/graph.html # in your favorite browser; on Mac "open" will do the right thing

You can now hack on graph.html, js/common.js and js/graph-2.js (maybe js/embed.js and js/dashboard.js, if you're working on the embed or dashboard components). You'll be pulling live data from graphs-new.mozilla.org by default.

For most cases, that's it! If you need more, read on:

*What about the dashboard? I loaded index.html but there are no graphs!*

No problem; it's all in the INSTALL file, but here's the tl;dr version:

These images are generated by running node.js from cron, doing server-side HTML5 canvas and saving the result to a static image (PNG).

You need to install node.js and npm, then:

npm install canvas htmlparser jquery jsdom

mkdir images/dashboard

node ./scripts/static_graphs.js

You should now have static graph images in ./images/dashboard/ and index.html should look healthier.

*But I want to run the backend server, so I can post my own results!*

Check out the INSTALL file; it has an example apache config and lists the dependencies you'll need to install (note - only tested on RHEL 6, will accept patches/pull requests if you get it running elsewhere though).

*Ok, but I have my own backend server; can't I just provide my own JSON feed?*

Yes! The manifest file (for building the menu on the "Custom Chart" page) looks like http://graphs-new.mozilla.org/api/test?attribute=short and the individual test runs look like http://graphs-new.mozilla.org/api/test/runs?id=16&branchid=1&platformid=12

*Ok! But I fixed/added/rewrote something, how can I send a patch?*

Excellent! Send me (http://github.com/rhelmer) a pull request, or file a bug at bugzilla in product Webtools component Graphserver version 2.0, and thanks for contributing!

links

social