+ // Experiment data
+ experiment: ( function () {
+ var start = ( new Date() ).getTime(), id = 0, seed = 0;
+
+ try {
+ id = JSON.parse( localStorage.getItem( 'moduleStorageExperiment' ) );
+ if ( typeof id !== 'number' ) {
+ id = Math.floor( Math.random() * Math.random() * 1e16 );
+ localStorage.setItem( 'moduleStorageExperiment', id );
+ }
+ seed = id % 2000;
+ } catch ( e ) {}
+
+ return {
+ // Unique identifier for this browser. This allows us to group all
+ // datapoints generated by a particular browser, which in turn allows us
+ // to see how the initial load compares to subsequent page loads.
+ id: id,
+
+ // Group assignment may be 0 (not in experiment), 1 (control group), or 2
+ // (experimental group). Browsers that don't implement all the prerequisite APIs
+ // (JSON and Web Storage) are ineligible. Eligible browsers have a 0.1% chance
+ // of being included in the experiment, in which case they are equally likely to
+ // be assigned to either the experimental or control group.
+ group: seed === 1 ? 1 : ( seed === 2 ? 2 : 0 ),
+
+ // Assess module storage performance by measuring the time between this
+ // reference point and the window load event.
+ start: start
+ };
+ }() ),
+