Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(608)

Unified Diff: client/html/benchmarks/dromaeo/tests/Common.dart

Issue 9845043: Rename client/{dom,html} to lib/{dom,html} . (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/html/benchmarks/dromaeo/test-tail.html ('k') | client/html/benchmarks/dromaeo/tests/DomAttr.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/html/benchmarks/dromaeo/tests/Common.dart
===================================================================
--- client/html/benchmarks/dromaeo/tests/Common.dart (revision 5796)
+++ client/html/benchmarks/dromaeo/tests/Common.dart (working copy)
@@ -1,51 +0,0 @@
-class Result {
- int get runs() { return _sorted.length; }
-
- double get sum() {
- double result = 0.0;
- _sorted.forEach((double e) { result += e; });
- return result;
- }
-
- double get min() { return _sorted[0]; }
- double get max() { return _sorted[runs - 1]; }
-
- double get mean() { return sum / runs; }
-
- double get median() {
- return (runs % 2 == 0) ?
- (_sorted[runs ~/ 2] + _sorted[runs ~/ 2 + 1]) / 2 : _sorted[runs ~/ 2];
- }
-
- double get variance() {
- double m = mean;
- double result = 0.0;
- _sorted.forEach((double e) { result += Math.pow(e - m, 2.0); });
- return result / (runs - 1);
- }
-
- double get deviation() { return Math.sqrt(variance); }
-
- // Compute Standard Errors Mean
- double get sem() { return (deviation / Math.sqrt(runs)) * T_DISTRIBUTION; }
-
- double get error() { return (sem / mean) * 100; }
-
- // TODO: Implement writeOn.
- String toString() {
- return '[Result: mean = ${mean}]';
- }
-
- factory Result(Array<double> runsPerSecond) {
- runsPerSecond.sort(int _(double a, double b) => a.compareTo(b));
- return new Result._internal(runsPerSecond);
- }
-
- Result._internal(this._sorted) {}
-
- Array<double> _sorted;
-
- // Populated from: http://www.medcalc.be/manual/t-distribution.php
- // 95% confidence for N - 1 = 4
- static final double T_DISTRIBUTION = 2.776;
-}
« no previous file with comments | « client/html/benchmarks/dromaeo/test-tail.html ('k') | client/html/benchmarks/dromaeo/tests/DomAttr.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698