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

Unified Diff: samples/third_party/dromaeo/web/tests/Common.dart

Issue 1576153002: Remove the Dromaeo and TodoMVC samples. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
Index: samples/third_party/dromaeo/web/tests/Common.dart
diff --git a/samples/third_party/dromaeo/web/tests/Common.dart b/samples/third_party/dromaeo/web/tests/Common.dart
deleted file mode 100644
index f763fb98a2f62ab0c490556f63591d75dda0c84e..0000000000000000000000000000000000000000
--- a/samples/third_party/dromaeo/web/tests/Common.dart
+++ /dev/null
@@ -1,53 +0,0 @@
-part of dromaeo;
-
-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(List<double> runsPerSecond) {
- runsPerSecond.sort((a, b) => a.compareTo(b));
- return new Result._internal(runsPerSecond);
- }
-
- Result._internal(this._sorted) {}
-
- List<double> _sorted;
-
- // Populated from: http://www.medcalc.be/manual/t-distribution.php
- // 95% confidence for N - 1 = 4
- static const double T_DISTRIBUTION = 2.776;
-}
« no previous file with comments | « samples/third_party/dromaeo/web/test-tail.html ('k') | samples/third_party/dromaeo/web/tests/RunnerSuite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698