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

Unified Diff: trunk/src/media/cast/test/utility/test_util.cc

Issue 328313002: Revert 276603 "Cast: Synthetic benchmark tool." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 6 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 | « trunk/src/media/cast/test/utility/test_util.h ('k') | trunk/src/media/cast/test/utility/udp_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/media/cast/test/utility/test_util.cc
===================================================================
--- trunk/src/media/cast/test/utility/test_util.cc (revision 276619)
+++ trunk/src/media/cast/test/utility/test_util.cc (working copy)
@@ -1,37 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include <math.h>
-
-#include <algorithm>
-
-#include "base/strings/stringprintf.h"
-#include "media/cast/test/utility/test_util.h"
-
-namespace media {
-namespace cast {
-namespace test {
-
-MeanAndError::MeanAndError(const std::vector<double>& values) {
- double sum = 0.0;
- double sqr_sum = 0.0;
- num_values = values.size();
- if (num_values) {
- for (size_t i = 0; i < num_values; i++) {
- sum += values[i];
- sqr_sum += values[i] * values[i];
- }
- mean = sum / num_values;
- std_dev =
- sqrt(std::max(0.0, num_values * sqr_sum - sum * sum)) / num_values;
- }
-}
-
-std::string MeanAndError::AsString() const {
- return base::StringPrintf("%f +/- %f", mean, std_dev);
-}
-
-} // namespace test
-} // namespace cast
-} // namespace media
« no previous file with comments | « trunk/src/media/cast/test/utility/test_util.h ('k') | trunk/src/media/cast/test/utility/udp_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698