Skip to content

A javascript, php and mongodb based page load measurement system based on the new Navigation Timing property

Notifications You must be signed in to change notification settings

ochronus/propero

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Propero

Simply put Propero is a javascript, php and mongodb based page load measurement system based on the new Navigation Timing property

What exactly is this 'Navigation Timing' thing?

First, you can read more here (W3C)

Navigation Timing is a new way to get detailed information about page load times via javascript.

See the diagram below for measurement points

Navigation Timing measurement points

Currently this window property is known to work in latest Chrome and IE9.

What you need to install

  • Install PHP 5.2+ (5.3 preferred), see how
  • Install a web server (apache, nginx, lighttpd, any you like), see google for a howto
  • Install mongodb see how
  • Install the PECL mongodb extension for PHP see how

What next

  • Clone this repo to a directory on your webserver, accessible by HTTP from the outside world
  • modify propero_config.php
  • run generator.php to generate propero.js (produces a minified JS code)
  • insert measurement script tag (generator.php echoes this to the console) to sites right before </body>

bonus:

  • configure proper caching on propero.js, see your webserver's manual

What's inside?

propero.js will initiate an AJAX GET call to the logger after the page has completed loading with all navigation timing data json'd. The logger will then log the current timestamp, the url and the timing data to mongodb

{ "_id" : ObjectId("4de630c28809b5567f000000"), "timing" : { "connectStart" : 1261333531, "responseStart" : 1261333614, "domLoading" : 1261333622, "connectEnd" : 1261333531, "domInteractive" : 1261336002, "fetchStart" : 1261333531, "secureConnectionStart" : 0, "domainLookupStart" : 1261333531, "responseEnd" : 1261333660, "requestStart" : 1261333533, "loadEventEnd" : 1261336280, "domComplete" : 1261336272, "redirectStart" : 0, "unloadEventEnd" : 1261333620, "domContentLoadedEventStart" : 1261336002, "domContentLoadedEventEnd" : 1261336008, "domainLookupEnd" : 1261333531, "navigationStart" : 1261333531, "unloadEventStart" : 1261333615, "loadEventStart" : 1261336272, "redirectEnd" : 0 }, "time" : 1306931394, "url" : "http://piwik.mostof.it/test.html" }

TODO

Erm... everything? :)

  • Support for multiple domains (stats / domain instead of one big pool of logs)
  • Stat screen(s), currently data is in mongodb only, there's no monitoring/stat screen yet

About

A javascript, php and mongodb based page load measurement system based on the new Navigation Timing property

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published