| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2006 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #include <math.h> | 11 #include <math.h> |
| 12 #include <time.h> | 12 #include <time.h> |
| 13 #if defined(WEBRTC_POSIX) | 13 #if defined(WEBRTC_POSIX) |
| 14 #include <netinet/in.h> | 14 #include <netinet/in.h> |
| 15 #endif | 15 #endif |
| 16 | 16 |
| 17 #include "webrtc/base/arraysize.h" | 17 #include "webrtc/base/arraysize.h" |
| 18 #include "webrtc/base/logging.h" | 18 #include "webrtc/base/logging.h" |
| 19 #include "webrtc/base/gunit.h" | 19 #include "webrtc/base/gunit.h" |
| 20 #include "webrtc/base/testclient.h" | 20 #include "webrtc/base/testclient.h" |
| 21 #include "webrtc/base/testutils.h" | 21 #include "webrtc/base/testutils.h" |
| 22 #include "webrtc/base/thread.h" | 22 #include "webrtc/base/thread.h" |
| 23 #include "webrtc/base/timeutils.h" | 23 #include "webrtc/base/timeutils.h" |
| 24 #include "webrtc/base/virtualsocketserver.h" | 24 #include "webrtc/base/virtualsocketserver.h" |
| 25 #include "webrtc/test/testsupport/gtest_disable.h" | |
| 26 | 25 |
| 27 using namespace rtc; | 26 using namespace rtc; |
| 28 | 27 |
| 29 // Sends at a constant rate but with random packet sizes. | 28 // Sends at a constant rate but with random packet sizes. |
| 30 struct Sender : public MessageHandler { | 29 struct Sender : public MessageHandler { |
| 31 Sender(Thread* th, AsyncSocket* s, uint32_t rt) | 30 Sender(Thread* th, AsyncSocket* s, uint32_t rt) |
| 32 : thread(th), | 31 : thread(th), |
| 33 socket(new AsyncUDPSocket(s)), | 32 socket(new AsyncUDPSocket(s)), |
| 34 done(false), | 33 done(false), |
| 35 rate(rt), | 34 rate(rt), |
| (...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1052 << " N=" << kTestSamples[sidx]; | 1051 << " N=" << kTestSamples[sidx]; |
| 1053 EXPECT_NEAR(kStdDev, stddev, 0.1 * kStdDev) | 1052 EXPECT_NEAR(kStdDev, stddev, 0.1 * kStdDev) |
| 1054 << "M=" << kTestMean[midx] | 1053 << "M=" << kTestMean[midx] |
| 1055 << " SD=" << kStdDev | 1054 << " SD=" << kStdDev |
| 1056 << " N=" << kTestSamples[sidx]; | 1055 << " N=" << kTestSamples[sidx]; |
| 1057 delete f; | 1056 delete f; |
| 1058 } | 1057 } |
| 1059 } | 1058 } |
| 1060 } | 1059 } |
| 1061 } | 1060 } |
| OLD | NEW |