[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e
paroga at webkit.org
paroga at webkit.org
Fri Jan 21 14:42:37 UTC 2011
The following commit has been merged in the debian/experimental branch:
commit 1a8d65abf6e14b7a903c378034105a52605d1deb
Author: paroga at webkit.org <paroga at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sun Dec 26 22:00:33 2010 +0000
2010-12-26 Patrick Gansterer <paroga at webkit.org>
Reviewed by Eric Seidel.
Improve output of HTML parser benchmark
https://bugs.webkit.org/show_bug.cgi?id=51611
Calculate and show median, min and max values.
* benchmarks/parser/html-parser.html:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74671 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 7c76dca..d702348 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,14 @@
+2010-12-26 Patrick Gansterer <paroga at webkit.org>
+
+ Reviewed by Eric Seidel.
+
+ Improve output of HTML parser benchmark
+ https://bugs.webkit.org/show_bug.cgi?id=51611
+
+ Calculate and show median, min and max values.
+
+ * benchmarks/parser/html-parser.html:
+
2010-12-26 Abhishek Arya <inferno at chromium.org>
Reviewed by Simon Fraser.
diff --git a/WebCore/benchmarks/parser/html-parser.html b/WebCore/benchmarks/parser/html-parser.html
index 56a40c3..f3e99ec 100644
--- a/WebCore/benchmarks/parser/html-parser.html
+++ b/WebCore/benchmarks/parser/html-parser.html
@@ -38,6 +38,32 @@ function computeAverage(values) {
return sum / values.length;
}
+function computeMax(values) {
+ var max = values.length ? values[0] : 0;
+ for (var i = 1; i < values.length; i++) {
+ if (max < values[i])
+ max = values[i];
+ }
+ return max;
+}
+
+function computeMedian(values) {
+ values.sort(function(a, b) { return a - b; });
+ var len = values.length;
+ if (len % 2)
+ return values[(len-1)/2];
+ return (values[len/2-1] + values[len/2]) / 2;
+}
+
+function computeMin(values) {
+ var min = values.length ? values[0] : 0;
+ for (var i = 1; i < values.length; i++) {
+ if (min > values[i])
+ min = values[i];
+ }
+ return min;
+}
+
function computeStdev(values) {
var average = computeAverage(values);
var sumOfSquaredDeviations = 0;
@@ -51,7 +77,10 @@ function computeStdev(values) {
function logStatistics(times) {
log("");
log("avg " + computeAverage(times));
+ log("median " + computeMedian(times));
log("stdev " + computeStdev(times));
+ log("min " + computeMin(times));
+ log("max " + computeMax(times));
}
function run() {
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list