diff --git a/benchmarks/layout/simple-blocks.html b/benchmarks/layout/simple-blocks.html
new file mode 100644
index 00000000000..094f763b103
--- /dev/null
+++ b/benchmarks/layout/simple-blocks.html
@@ -0,0 +1,44 @@
+
+
+
+
+
+
diff --git a/benchmarks/resources/runner.sky b/benchmarks/resources/runner.sky
index eaa1059e071..e307c0d2732 100644
--- a/benchmarks/resources/runner.sky
+++ b/benchmarks/resources/runner.sky
@@ -3,6 +3,7 @@ function PerfRunner(options) {
this.unit_ = options.unit || "ms";
this.iterationsRemaining_ = options.iterations || 10;
this.results_ = [];
+ this.setup_ = options.setup;
}
PerfRunner.prototype.log = function(line) {
@@ -17,9 +18,15 @@ PerfRunner.prototype.recordResult = function(result) {
PerfRunner.prototype.runAsync = function(test) {
var self = this;
window.setTimeout(function() {
+ if (self.setup_) {
+ var setup = self.setup_;
+ setup();
+ }
+
var startTime = Date.now();
test(function() {
var endTime = Date.now();
+
self.recordResult(endTime - startTime);
if (--self.iterationsRemaining_ > 0)
self.runAsync(test);