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

Side by Side Diff: webrtc/video/end_to_end_tests.cc

Issue 1569853002: Measure encoding time on encode callbacks. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 10 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 #include <algorithm> 10 #include <algorithm>
(...skipping 2622 matching lines...) Expand 10 before | Expand all | Expand 10 after
2633 } 2633 }
2634 2634
2635 bool CheckSendStats() { 2635 bool CheckSendStats() {
2636 RTC_DCHECK(send_stream_ != nullptr); 2636 RTC_DCHECK(send_stream_ != nullptr);
2637 VideoSendStream::Stats stats = send_stream_->GetStats(); 2637 VideoSendStream::Stats stats = send_stream_->GetStats();
2638 2638
2639 send_stats_filled_["NumStreams"] |= 2639 send_stats_filled_["NumStreams"] |=
2640 stats.substreams.size() == expected_send_ssrcs_.size(); 2640 stats.substreams.size() == expected_send_ssrcs_.size();
2641 2641
2642 send_stats_filled_["CpuOveruseMetrics"] |= 2642 send_stats_filled_["CpuOveruseMetrics"] |=
2643 stats.avg_encode_time_ms != 0 || stats.encode_usage_percent != 0; 2643 stats.avg_encode_time_ms != 0 && stats.encode_usage_percent != 0;
2644 2644
2645 send_stats_filled_["EncoderImplementationName"] |= 2645 send_stats_filled_["EncoderImplementationName"] |=
2646 stats.encoder_implementation_name == 2646 stats.encoder_implementation_name ==
2647 test::FakeEncoder::kImplementationName; 2647 test::FakeEncoder::kImplementationName;
2648 2648
2649 for (std::map<uint32_t, VideoSendStream::StreamStats>::const_iterator it = 2649 for (std::map<uint32_t, VideoSendStream::StreamStats>::const_iterator it =
2650 stats.substreams.begin(); 2650 stats.substreams.begin();
2651 it != stats.substreams.end(); ++it) { 2651 it != stats.substreams.end(); ++it) {
2652 EXPECT_TRUE(expected_send_ssrcs_.find(it->first) != 2652 EXPECT_TRUE(expected_send_ssrcs_.find(it->first) !=
2653 expected_send_ssrcs_.end()); 2653 expected_send_ssrcs_.end());
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after
3520 private: 3520 private:
3521 bool video_observed_; 3521 bool video_observed_;
3522 bool audio_observed_; 3522 bool audio_observed_;
3523 SequenceNumberUnwrapper unwrapper_; 3523 SequenceNumberUnwrapper unwrapper_;
3524 std::set<int64_t> received_packet_ids_; 3524 std::set<int64_t> received_packet_ids_;
3525 } test; 3525 } test;
3526 3526
3527 RunBaseTest(&test); 3527 RunBaseTest(&test);
3528 } 3528 }
3529 } // namespace webrtc 3529 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698