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

Side by Side Diff: pkg/front_end/tool/fasta/standard_deviation.dart

Issue 2731703003: A/B fasta performance measurement harness (Closed)
Patch Set: merge Created 3 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 unified diff | Download patch
« no previous file with comments | « pkg/front_end/tool/fasta/compile.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 import 'dart:math';
2
3 double average(List<double> elapsedTimes) {
4 return elapsedTimes.reduce((v, e) => v + e) / elapsedTimes.length;
5 }
6
7 double standardDeviation(double mean, List<double> elapsedTimes) {
8 double numerator = 0.0;
9 for (double elapseTime in elapsedTimes) {
10 numerator += (elapseTime - mean) * (elapseTime - mean);
11 }
12 double stdDev = sqrt(numerator / (elapsedTimes.length - 1));
13 return stdDev;
14 }
15
16 double standardDeviationOfTheMean(List<double> elapsedTimes, double stdDev) {
17 return stdDev / sqrt(elapsedTimes.length);
18 }
OLDNEW
« no previous file with comments | « pkg/front_end/tool/fasta/compile.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698