https://bugs.webkit.org/show_bug.cgi?id=86399
Reviewed by Ojan Vafai.
Use runPerSecond instead of run to measure results in function calls per second (run/s) instead of time (ms).
This allows us to continue measuring performance reliably even when WebKit's performance improves and results
become too small for Date.now()'s precision (around 15 ms).
It should also reduce perf. bots cycle time for slower tests because we limit the number of function calls by time.
* CSS/CSSPropertySetterGetter.html:
* CSS/CSSPropertyUpdateValue.html:
* Parser/css-parser-yui.html:
* Parser/simple-url.html:
* Parser/tiny-innerHTML.html:
* Parser/url-parser.html:
* Parser/xml-parser.html:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117001
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
'webkitTransform' : 'scale3d(0.5, 0.5, 0.5)',
'wordSpacing' : '40px',
};
-PerfTestRunner.run(function() {
+PerfTestRunner.runPerSecond({run:function() {
for (key in properties) {
var value = div.style[key];
div.style[key] = "";
div.style[key] = properties[key];
}
-}, 5000);
+}});
</script>
</html>
'wordSpacing' : '40px',
};
// The first run will just add the properties but it's fine as the first run of the benchmark is always ignored.
-PerfTestRunner.run(function() {
+PerfTestRunner.runPerSecond({run:function() {
for (key in properties)
div.style[key] = properties[key];
-}, 10000);
+}});
</script>
</html>
+2012-05-14 Ryosuke Niwa <rniwa@webkit.org>
+
+ Convert CSS and Parser tests to runs/s tests
+ https://bugs.webkit.org/show_bug.cgi?id=86399
+
+ Reviewed by Ojan Vafai.
+
+ Use runPerSecond instead of run to measure results in function calls per second (run/s) instead of time (ms).
+ This allows us to continue measuring performance reliably even when WebKit's performance improves and results
+ become too small for Date.now()'s precision (around 15 ms).
+
+ It should also reduce perf. bots cycle time for slower tests because we limit the number of function calls by time.
+
+ * CSS/CSSPropertySetterGetter.html:
+ * CSS/CSSPropertyUpdateValue.html:
+ * Parser/css-parser-yui.html:
+ * Parser/simple-url.html:
+ * Parser/tiny-innerHTML.html:
+ * Parser/url-parser.html:
+ * Parser/xml-parser.html:
+
2012-05-14 Dan Bernstein <mitz@apple.com>
Add a line layout performance test
var element = document.getElementById("styleElement");
var cssText = element.textContent;
var count = 0;
-PerfTestRunner.run(function() {
+PerfTestRunner.runPerSecond({run:function() {
element.textContent = "";
element.textContent = cssText + "#some" + count + "{color:black};";
count++;
-}, 100);
+}});
</script>
</body>
<script src="../resources/runner.js"></script>
<script>
var anchor = document.createElement("a");
-PerfTestRunner.run(function() {
+PerfTestRunner.runPerSecond({run:function() {
for (var x = 0; x < 200000; x++) {
anchor.href = "http://www.apple.com/"
}
-});
+}});
</script>
</body>
<body>
<script src="../resources/runner.js"></script>
<script>
-PerfTestRunner.run(function() {
+PerfTestRunner.runPerSecond({run:function() {
var testDiv = document.createElement("div");
testDiv.style.display = "none";
document.body.appendChild(testDiv);
testDiv.innerHTML = "This is a tiny HTML document";
}
document.body.removeChild(testDiv);
-});
+}});
</script>
</body>
var urls = PerfTestRunner.loadFile("resources/final-url-en").split("\n");
var anchor = document.createElement("a");
-PerfTestRunner.run(function() {
+PerfTestRunner.runPerSecond({run:function() {
for (var x = 0; x < urls.length; x++) {
anchor.href = urls[x];
}
-});
+}});
</script>
</body>
xmlArray.push('</root>')
var xmlData = xmlArray.join('');
-PerfTestRunner.run(function() {
+PerfTestRunner.runPerSecond({run:function() {
domParser.parseFromString(xmlData, "text/xml");
-});
+}});
</script>
</body>