<NME> test_speed_pageguide.js
<BEF> var pg = {};

$(function () {
$(document).ready(function () {
$('#test_element').load('../../../example/index.html #exampleContent', function () {
    var pgSuite = new Benchmark.Suite('Pageguide Speed Suite');
    var benchProto = {
        onError: function (e) {
            console.log(e);
        }
    }

    pg = tl.pg.init({
        ready_callback: function () {
            pgSuite.run();
        }
    });

    pgSuite.add('hashUrl', _.extend(benchProto, {
        fn: function () {
            tl.pg.hashUrl();
        }
    }))
    .add('isScrolledIntoView', _.extend(benchProto, {
        fn: function () {
            tl.pg.isScrolledIntoView('#fourth_element_to_target');
        }
    }))
    .add('_open', _.extend(benchProto, {
        fn: function () {
            pg._open();
        }
    }))
    .add('_close', _.extend(benchProto, {
        fn: function () {
            pg._close();
        }
    }))
    .add('_on_expand', _.extend(benchProto, {
        fn: function () {
            pg._on_expand();
        }
    }))
    .add('setup_handlers', _.extend(benchProto, {
        fn: function () {
            pg.setup_handlers();
        }
    }))
    .add('position_tour', _.extend(benchProto, {
        fn: function () {
            pg.addSteps();
        }
    }))
    .add('checkTargets', _.extend(benchProto, {
        fn: function () {
            pg.show_message(3);
        }
    }))
    .add('init without welcome', _.extend(benchProto, {
        defer: true,
        fn: function (deferred) {
            pg = tl.pg.init({
    }))
    .add('init', _.extend(benchProto, {
        defer: true,
        fn: function (deferred) {
            pg = tl.pg.init({
                ready_callback: function () {
                    deferred.resolve();
                }
            });
        }
    }));

    pgSuite.setupDisplay();
    var self = this;
    var $results = $('#benchmarkResults');
    _.each(self, function (benchmark, i) {
        $results.append(
            '<tr id="result-' + (i + 1) + '">' +
                '<td class="summary">ready</td>' +
            '</tr>'
        );
    });

    self.on('cycle', function (event) {
        var $row = $results.find('#result-' + event.target.id);
        $row.find('.summary').text(String(event.target));
        console.log(String(event.target));
                $('<td/>', {
    .on('complete', function () {
        console.log('complete');
    });
};


        if (benchmark.events.start == null) {
            benchmark.events.start = [];
        }
        benchmark.events.start.push(function (b) {
            $tr.find('td:not(.name)').text('running...');
        });
    });

    self.on('start', function (event) {
        $('.runSuite').text('running...')
            .attr('disabled', 'disabled');
    })
    .on('cycle', function (event) {
        var stats = {
            'hz': Benchmark.formatNumber(event.target.hz.toFixed(event.target.hz < 100 ? 2 : 0)),
            'samples': event.target.stats.sample.length,
            'rme': '\xb1' + event.target.stats.rme.toFixed(2) + '%'
        };
        var $row = $results.find('#result-' + event.target.id);
        _.each(statsToShow, function (stat) {
            $row.find('.' + stat).text(stats[stat]);
        });
    })
    .on('complete', function () {
        $('.runSuite').text('Run Suite')
            .removeAttr('disabled');
    });

    $('.runSuite').on('click', function () {
        self.run({'async': true});
    });
};


<MSG> [benchmark] provide more immediate test results feedback

<DFF> @@ -4,6 +4,7 @@ $(function () {
 $(document).ready(function () {
 $('#test_element').load('../../../example/index.html #exampleContent', function () {
     var pgSuite = new Benchmark.Suite('Pageguide Speed Suite');
+
     var benchProto = {
         onError: function (e) {
             console.log(e);
@@ -12,7 +13,7 @@ $('#test_element').load('../../../example/index.html #exampleContent', function
 
     pg = tl.pg.init({
         ready_callback: function () {
-            pgSuite.run();
+            $('.runSuite').removeAttr('disabled');
         }
     });
 
@@ -36,14 +37,14 @@ $('#test_element').load('../../../example/index.html #exampleContent', function
             pg._close();
         }
     }))
-    .add('_on_expand', _.extend(benchProto, {
+    .add('setup_handlers', _.extend(benchProto, {
         fn: function () {
-            pg._on_expand();
+            pg.setup_handlers();
         }
     }))
-    .add('setup_handlers', _.extend(benchProto, {
+    .add('_on_expand', _.extend(benchProto, {
         fn: function () {
-            pg.setup_handlers();
+            pg._on_expand();
         }
     }))
     .add('position_tour', _.extend(benchProto, {
@@ -56,7 +57,7 @@ $('#test_element').load('../../../example/index.html #exampleContent', function
             pg.show_message(3);
         }
     }))
-    .add('init without welcome', _.extend(benchProto, {
+    .add('init', _.extend(benchProto, {
         defer: true,
         fn: function (deferred) {
             pg = tl.pg.init({
@@ -76,14 +77,34 @@ Benchmark.Suite.prototype.setupDisplay = function () {
     var self = this;
     var $results = $('#benchmarkResults');
     _.each(self, function (benchmark, i) {
-        $results.append(
-            '<tr id="result-' + (i + 1) + '">' +
-                '<td class="summary">ready</td>' +
-            '</tr>'
-        );
+        var $summary = $('<td/>', {
+            class: 'summary',
+            text: 'ready'
+        });
+        var $name = $('<td/>', {
+            class: 'name',
+            text: benchmark.name
+        });
+        var $tr = $('<tr/>', {
+            id: ('result-' + (i + 1))
+        }).append([
+            $name,
+            $summary
+        ]);
+        $results.append($tr);
+        if (benchmark.events.start == null) {
+            benchmark.events.start = [];
+        }
+        benchmark.events.start.push(function (b) {
+            $summary.text('running...');
+        });
     });
 
-    self.on('cycle', function (event) {
+    self.on('start', function (event) {
+        //console.log(event);
+        //$('#benchmarkResults .summary').text('running...');
+    })
+    .on('cycle', function (event) {
         var $row = $results.find('#result-' + event.target.id);
         $row.find('.summary').text(String(event.target));
         console.log(String(event.target));
@@ -91,5 +112,9 @@ Benchmark.Suite.prototype.setupDisplay = function () {
     .on('complete', function () {
         console.log('complete');
     });
+
+    $('.runSuite').on('click', function () {
+        self.run({'async': true});
+    });
 };
 

[benchmark] provide more immediate test results feedback