liqd/adhocracy — pull request #393 by skoenen (2013-05-22 14:24:25+00:00)
Title: Record navigation timing information

Original issue from @phihag [adhocracy.hhu_theme/issues/120](https://github.com/hhucn/adhocracy.hhu_theme/issues/120):
> We don't know how fast adhocracy loads for various users. In order to record that information, use the [navigation timing API](https://developer.mozilla.org/en-US/docs/Navigation_timing) and send its values via an Ajax query to a controller (optionally record the information there - we already log all request URLs, see #58). Make sure it fails silently on a browsers that [don't support the API](http://caniuse.com/nav-timing). Add an installation-wide option to enable the code, and port it to mainline adhocracy.

We want to seperate the activation from the extended stats monitoring with an option, this leads to a modification of `lib/base.py`

So i made this pull request for the changes in `lib/base.py`, and added the modifications in `adhocracy.js` and in `templates/root.html` to make the new option of any use.

The information will be logged by the `lib/requestlog.py`, due to the appended `timings` object at the url.

*This code fires 500ms after the `onLoad` event of the window object is fired.*