I think one can get that information directly from javascript. Here's a snippet of code I wrote that copies some functionality from the telemetry testing system. It may be enough to figure out how to do it.
def get_histogram(self, histogram_function, histogram_name):
"""Returns the requested histogram as a python object."""
# TODO(semenzato): Ideally this function should know if the histogram
# is browser or renderer from the histogram name. Maybe it could try
# both, and remember the successful one.
assert histogram_function in ("getHistogram", "getBrowserHistogram")
js = 'statsCollectionController.%s("%s")' % \
(histogram_function, histogram_name)
result = self.eval_js(js)
return json.loads(js_return_value(result))
I am not sure if this works on regular Chrome or if it needs some special flags. This is how it works for me:
CHROME_FLAGS = \
",".join((
"--disable-component-extensions-with-background-pages",
"--disable-default-apps",
"--disable-gaia-services"
"--enable-gpu-benchmarking",
"--enable-net-benchmarking",
"--enable-per-tile-painting",
"--enable-smooth-scrolling",
"--enable-stats-collection-bindings",
"--enable-threaded-compositing",
"--ignore-certificate-errors",
"--metrics-recording-only",
"--no-default-browser-check",
"--no-first-run",
"--no-proxy-server",
"--oobe-skip-postlogin",
"--remote-debugging-port=9222",
"--start-maximized",
"--user-agent=" + USER_AGENT,
"--vmodule=*/chromeos/net/*=2\\,*/chromeos/login/*=2",
))