Skip to content
Permalink
Browse files
Merge Speedometer 2.0 fixes up to r217121 to browserbench.org
https://bugs.webkit.org/show_bug.cgi?id=172389

Rubber-stamped by Chris Dumez.

Merged the various fixes for Speedometer 2.0 starting from r217107 through r217121.

* Speedometer2.0/InteractiveRunner.html:
* Speedometer2.0/resources/benchmark-runner.js:
* Speedometer2.0/resources/tests.js:
* Speedometer2.0/resources/todomvc/dependency-examples/flight/flight/app/js/main.js:
* Speedometer2.0/resources/todomvc/dependency-examples/flight/flight/node_modules/requirejs/require.js:
* Speedometer2.0/resources/todomvc/functional-prog-examples/elm/dist/elm.js:
* Speedometer2.0/resources/todomvc/vanilla-examples/vanillajs/js/store.js:


Canonical link: https://commits.webkit.org/189287@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217154 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
rniwa committed May 19, 2017
1 parent 8b06995 commit 93a4930efad4595b542598906e4b59879227d343
Show file tree
Hide file tree
Showing 8 changed files with 74 additions and 29 deletions.
@@ -1,3 +1,20 @@
2017-05-19 Ryosuke Niwa <rniwa@webkit.org>

Merge Speedometer 2.0 fixes up to r217121 to browserbench.org
https://bugs.webkit.org/show_bug.cgi?id=172389

Rubber-stamped by Chris Dumez.

Merged the various fixes for Speedometer 2.0 starting from r217107 through r217121.

* Speedometer2.0/InteractiveRunner.html:
* Speedometer2.0/resources/benchmark-runner.js:
* Speedometer2.0/resources/tests.js:
* Speedometer2.0/resources/todomvc/dependency-examples/flight/flight/app/js/main.js:
* Speedometer2.0/resources/todomvc/dependency-examples/flight/flight/node_modules/requirejs/require.js:
* Speedometer2.0/resources/todomvc/functional-prog-examples/elm/dist/elm.js:
* Speedometer2.0/resources/todomvc/vanilla-examples/vanillajs/js/store.js:

2017-05-18 Ryosuke Niwa <rniwa@webkit.org>

Add Speedometer 2.0 to browserbench.org for final testing
@@ -10,7 +10,8 @@
ol ol { margin-left: 2em; list-position: outside; }
.running { text-decoration: underline; }
.ran { color: grey; }
nav { position: absolute; right: 10px; }
nav { position: absolute; right: 10px; height: 600px; }
nav > ol { height: 100%; overflow-y: scroll; }
</style>
</head>
<body>
@@ -192,6 +192,7 @@ BenchmarkRunner.prototype.step = function (state) {
}

if (state.isFirstTest()) {
this._removeFrame();
this._masuredValuesForCurrentSuite = {};
var self = this;
return state.prepareCurrentSuite(this, this._appendFrame()).then(function (prepareReturnValue) {
@@ -251,8 +252,6 @@ BenchmarkRunner.prototype._runTestAndRecordResults = function (state) {
self._client.didRunTest(suite, test);

state.next();
if (state.currentSuite() != suite)
self._removeFrame();
promise.resolve(state);
});
}, 0);
@@ -250,9 +250,8 @@ Suites.push({
checkboxes[i].click();
}),
new BenchmarkTestStep('DeletingAllItems', function (newTodo, contentWindow, contentDocument) {
var deleteButtons = contentDocument.querySelectorAll('.destroy');
for (var i = 0; i < deleteButtons.length; i++)
deleteButtons[i].click();
for (var i = 0; i < numberOfItemsToAdd; i++)
contentDocument.querySelector('.destroy').click();
}),
]
});
@@ -340,14 +339,13 @@ Suites.push({
}
}),
new BenchmarkTestStep('CompletingAllItems', function (newTodo, contentWindow, contentDocument) {
var checkboxes = contentDocument.querySelectorAll('.toggle');
var checkboxes = contentDocument.getElementsByClassName('toggle');
for (var i = 0; i < checkboxes.length; i++)
checkboxes[i].click();
}),
new BenchmarkTestStep('DeletingAllItems', function (newTodo, contentWindow, contentDocument) {
var deleteButtons = contentDocument.querySelectorAll('.destroy');
for (var i = 0; i < deleteButtons.length; i++)
deleteButtons[i].click();
for (var i = 0; i < numberOfItemsToAdd; i++)
contentDocument.querySelector('.destroy').click();
}),
]
})
@@ -408,12 +406,24 @@ Suites.push({
}),
new BenchmarkTestStep('DeletingItems', function (params, contentWindow, contentDocument) {
var deleteButtons = contentDocument.querySelectorAll('.destroy');
for (var i = 0; i < deleteButtons.length; i++)
deleteButtons[i].click();
for (var i = 0; i < numberOfItemsToAdd; i++)
contentDocument.querySelector('.destroy').click();
}),
]
});

function processElmWorkQueue(contentWindow)
{
contentWindow.elmWork();
var callbacks = contentWindow.rAFCallbackList;
var i = 0;
while (i < callbacks.length) {
callbacks[i]();
i++;
}
contentWindow.rAFCallbackList = [];
}

Suites.push({
name: 'Elm-TodoMVC',
url: 'todomvc/functional-prog-examples/elm/index.html',
@@ -431,18 +441,23 @@ Suites.push({
bubbles: true,
cancelable: true
}));
processElmWorkQueue(contentWindow);
triggerEnter(newTodo, 'keydown');
processElmWorkQueue(contentWindow);
}
}),
new BenchmarkTestStep('CompletingAllItems', function (params, contentWindow, contentDocument) {
var checkboxes = contentDocument.querySelectorAll('.toggle');
for (var i = 0; i < checkboxes.length; i++)
for (var i = 0; i < checkboxes.length; i++) {
checkboxes[i].click();
processElmWorkQueue(contentWindow);
}
}),
new BenchmarkTestStep('DeletingItems', function (params, contentWindow, contentDocument) {
var deleteButtons = contentDocument.querySelectorAll('.destroy');
for (var i = 0; i < deleteButtons.length; i++)
deleteButtons[i].click();
for (var i = 0; i < numberOfItemsToAdd; i++) {
contentDocument.querySelector('.destroy').click();
processElmWorkQueue(contentWindow);
}
}),
]
});
@@ -451,9 +466,10 @@ Suites.push({
name: 'Flight-TodoMVC',
url: 'todomvc/dependency-examples/flight/flight/index.html',
prepare: function (runner, contentWindow, contentDocument) {
return runner.waitForElement('#new-todo').then(function (element) {
element.focus();
return element;
return runner.waitForElement('#appIsReady').then(function (element) {
var newTodo = contentDocument.getElementById('new-todo');
newTodo.focus();
return newTodo;
});
},
tests: [
@@ -23,9 +23,20 @@ require.config({
}
});

function checkReady(count) {
if (window.checkLoadedTimeoutId)
return setTimeout(checkReady.bind(this, 0), 50);
if (count < 5)
return setTimeout(checkReady.bind(this, count + 1), 10);

var dummyNodeToNotifyAppIsReady = document.createElement('div');
dummyNodeToNotifyAppIsReady.id = 'appIsReady';
document.body.appendChild(dummyNodeToNotifyAppIsReady);
}

require([], function () {
require(['app/page/app'],function(App){
App.initialize();
console.log(App);
checkReady(0);
});
});

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

@@ -2678,7 +2678,7 @@ function work()
}
setTimeout(work, 0);
}

window.elmWork = work;

return {
succeed: succeed,
@@ -7009,9 +7009,7 @@ function on(node)
};
}

var rAF = typeof requestAnimationFrame !== 'undefined'
? requestAnimationFrame
: function(callback) { callback(); };
var rAF = function(callback) { callback(); };

function withNode(id, doStuff)
{
@@ -7485,10 +7483,10 @@ function renderer(parent, tagger, initialVirtualNode)
}


var rAF =
typeof requestAnimationFrame !== 'undefined'
? requestAnimationFrame
: function(cb) { setTimeout(cb, 1000 / 60); };
window.rAFCallbackList = [];
var rAF = function (callback) {
window.rAFCallbackList.push(callback);
}



@@ -3,6 +3,8 @@
'use strict';

var MemoryStorage = {};
var id = 1;

/**
* Creates a new client side storage object and will create an empty
* collection if no collection already exists.
@@ -96,7 +98,7 @@
callback.call(this, todos);
} else {
// Generate an ID
updateData.id = new Date().getTime();
updateData.id = id++;

todos.push(updateData);
MemoryStorage[this._dbName] = JSON.stringify(data);

0 comments on commit 93a4930

Please sign in to comment.