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

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

Issue 2738183004: Clean up perf metrics and report ramp-up stats for fewer tests. (Closed)
Patch Set: 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 | « webrtc/call/rampup_tests.cc ('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
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 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 "webrtc/video/video_quality_test.h" 10 #include "webrtc/video/video_quality_test.h"
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
737 ++frames_processed_; 737 ++frames_processed_;
738 assert(frames_processed_ <= frames_to_process_); 738 assert(frames_processed_ <= frames_to_process_);
739 return frames_processed_ == frames_to_process_; 739 return frames_processed_ == frames_to_process_;
740 } 740 }
741 741
742 void PrintResults() { 742 void PrintResults() {
743 StopMeasuringCpuProcessTime(); 743 StopMeasuringCpuProcessTime();
744 rtc::CritScope crit(&comparison_lock_); 744 rtc::CritScope crit(&comparison_lock_);
745 PrintResult("psnr", psnr_, " dB"); 745 PrintResult("psnr", psnr_, " dB");
746 PrintResult("ssim", ssim_, " score"); 746 PrintResult("ssim", ssim_, " score");
747 PrintResult("sender_time", sender_time_, " ms");
748 PrintResult("receiver_time", receiver_time_, " ms");
749 PrintResult("total_delay_incl_network", end_to_end_, " ms"); 747 PrintResult("total_delay_incl_network", end_to_end_, " ms");
750 PrintResult("time_between_rendered_frames", rendered_delta_, " ms"); 748 PrintResult("time_between_rendered_frames", rendered_delta_, " ms");
751 PrintResult("encoded_frame_size", encoded_frame_size_, " bytes");
752 PrintResult("encode_frame_rate", encode_frame_rate_, " fps"); 749 PrintResult("encode_frame_rate", encode_frame_rate_, " fps");
753 PrintResult("encode_time", encode_time_ms_, " ms"); 750 PrintResult("encode_time", encode_time_ms_, " ms");
754 PrintResult("encode_usage_percent", encode_usage_percent_, " percent");
755 PrintResult("media_bitrate", media_bitrate_bps_, " bps"); 751 PrintResult("media_bitrate", media_bitrate_bps_, " bps");
756 752
757 printf("RESULT actual_bitrate: %s = %.6lf bps\n", test_label_.c_str(),
758 GetAverageMediaBitrateBps());
759
760 if (receive_stream_ != nullptr) { 753 if (receive_stream_ != nullptr) {
761 PrintResult("decode_time", decode_time_ms_, " ms"); 754 PrintResult("decode_time", decode_time_ms_, " ms");
762 PrintResult("decode_time_max", decode_time_max_ms_, " ms");
763 } 755 }
764 756
765 printf("RESULT dropped_frames: %s = %d frames\n", test_label_.c_str(), 757 printf("RESULT dropped_frames: %s = %d frames\n", test_label_.c_str(),
766 dropped_frames_); 758 dropped_frames_);
767 printf("RESULT dropped_frames_before_first_encode: %s = %d frames\n",
768 test_label_.c_str(), dropped_frames_before_first_encode_);
769 printf("RESULT dropped_frames_before_rendering: %s = %d frames\n",
770 test_label_.c_str(), dropped_frames_before_rendering_);
771 printf("RESULT cpu_usage: %s = %lf %%\n", test_label_.c_str(), 759 printf("RESULT cpu_usage: %s = %lf %%\n", test_label_.c_str(),
772 GetCpuUsagePercent()); 760 GetCpuUsagePercent());
773 761
774 #if defined(WEBRTC_WIN) 762 #if defined(WEBRTC_WIN)
775 // On Linux and Mac in Resident Set some unused pages may be counted. 763 // On Linux and Mac in Resident Set some unused pages may be counted.
776 // Therefore this metric will depend on order in which tests are run and 764 // Therefore this metric will depend on order in which tests are run and
777 // will be flaky. 765 // will be flaky.
778 PrintResult("memory_usage", memory_usage_, " bytes"); 766 PrintResult("memory_usage", memory_usage_, " bytes");
779 #endif 767 #endif
780 768
(...skipping 1115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1896 if (!params_.video.encoded_frame_base_path.empty()) { 1884 if (!params_.video.encoded_frame_base_path.empty()) {
1897 std::ostringstream str; 1885 std::ostringstream str;
1898 str << receive_logs_++; 1886 str << receive_logs_++;
1899 std::string path = 1887 std::string path =
1900 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf"; 1888 params_.video.encoded_frame_base_path + "." + str.str() + ".recv.ivf";
1901 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path), 1889 stream->EnableEncodedFrameRecording(rtc::CreatePlatformFile(path),
1902 10000000); 1890 10000000);
1903 } 1891 }
1904 } 1892 }
1905 } // namespace webrtc 1893 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/call/rampup_tests.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698