Single-API Firefox Telemetry Plots: telemetry-wrapper.js

Say you’ve read my earlier post on Firefox Telemetry and want to make your own plots like does. Well, like almost everything Mozilla does, that website is open source, so we can just copy what it does… except it’s a little convoluted. It needs to support a range of requirements and configurations, after all.

But your needs are just yours, so wouldn’t it be nice if there were something a little more direct?

Enter telemetry-wrapper.js. Simply include it and its dependencies in your HTML and then call it like so:

TelemetryWrapper.go(params, element);

Then ‘element’ will suddenly (after a few seconds to collate and render the data) contain one or more plots corresponding to ‘params’.

Want to see GC_MS compared by e10sEnabled setting on Nightly 44?

  channel: "nightly",
  version: "44",
  metric: "GC_MS",
  compare: "e10sEnabled",
}, document.body);

(e10s is looking like a win on this metric, though part of the sample population self-selected so we can’t be sure. Await blog posts from other quarters on A/B tests we’re conducting.)

How about the top three plugins activated in Firefox 42?

  channel: "release",
  version: "42",
  keyLimit: 3,
}, document.body);

(no one is surprised that the top one is Flash and that most people only use it the once. But googletalk has an odd shape to it, being activated exactly twice by clients more often than any other frequency…)

The technical details are in the README. Use and reuse it to ask and answer questions about Firefox Telemetry data!


One thought on “Single-API Firefox Telemetry Plots: telemetry-wrapper.js

  1. Pingback: To-Order Telemetry Dashboards: dashboard-generator | chuttenblog

Comments are closed.