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

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/test/metric_recorder.cc

Issue 1253473004: BWE Simulation Framework: Standard plot logging (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Comments addressed Created 5 years, 5 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) 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 10
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 throughput_bytes_(), 123 throughput_bytes_(),
124 weighted_estimate_error_(), 124 weighted_estimate_error_(),
125 last_unweighted_estimate_error_(0), 125 last_unweighted_estimate_error_(0),
126 optimal_throughput_bits_(0), 126 optimal_throughput_bits_(0),
127 last_available_bitrate_per_flow_kbps_(0), 127 last_available_bitrate_per_flow_kbps_(0),
128 start_computing_metrics_ms_(0), 128 start_computing_metrics_ms_(0),
129 started_computing_metrics_(false) { 129 started_computing_metrics_(false) {
130 } 130 }
131 131
132 void MetricRecorder::SetPlotInformation( 132 void MetricRecorder::SetPlotInformation(
133 const std::vector<std::string>& prefixes) { 133 const std::vector<std::string>& prefixes,
134 bool plot_delay) {
stefan-webrtc 2015/07/24 14:06:55 This should probably be called plot_loss_and_delay
magalhaesc 2015/07/25 22:35:31 Done.
134 assert(prefixes.size() == kNumMetrics); 135 assert(prefixes.size() == kNumMetrics);
135 for (size_t i = 0; i < kNumMetrics; ++i) { 136 for (size_t i = 0; i < kNumMetrics; ++i) {
136 plot_information_[i].prefix = prefixes[i]; 137 plot_information_[i].prefix = prefixes[i];
137 } 138 }
138 plot_information_[kThroughput].plot_interval_ms = 100; 139 plot_information_[kThroughput].plot_interval_ms = 100;
139 plot_information_[kDelay].plot_interval_ms = 100; 140 plot_information_[kDelay].plot_interval_ms = 100;
140 plot_information_[kLoss].plot_interval_ms = 500; 141 plot_information_[kLoss].plot_interval_ms = 500;
141 plot_information_[kObjective].plot_interval_ms = 1000; 142 plot_information_[kObjective].plot_interval_ms = 1000;
142 plot_information_[kTotalAvailable].plot_interval_ms = 1000; 143 plot_information_[kTotalAvailable].plot_interval_ms = 1000;
143 plot_information_[kAvailablePerFlow].plot_interval_ms = 1000; 144 plot_information_[kAvailablePerFlow].plot_interval_ms = 1000;
144 145
145 for (int i = kThroughput; i < kNumMetrics; ++i) { 146 for (int i = kThroughput; i < kNumMetrics; ++i) {
146 plot_information_[i].last_plot_ms = 0; 147 plot_information_[i].last_plot_ms = 0;
147 if (i == kObjective || i == kAvailablePerFlow) { 148 switch (i) {
148 plot_information_[i].plot = false; 149 case kAvailablePerFlow:
149 } else { 150 case kObjective:
150 plot_information_[i].plot = true; 151 plot_information_[i].plot = false;
152 break;
153 case kLoss: // Plot loss for flows of which delay is ploted.
stefan-webrtc 2015/07/24 14:06:55 plotted
magalhaesc 2015/07/25 22:35:31 Done.
154 case kDelay:
155 plot_information_[i].plot = plot_delay;
156 break;
157 default:
158 plot_information_[i].plot = true;
151 } 159 }
152 } 160 }
153 } 161 }
154 162
155 void MetricRecorder::PlotAllDynamics() { 163 void MetricRecorder::PlotAllDynamics() {
156 for (int i = kThroughput; i < kNumMetrics; ++i) { 164 for (int i = kThroughput; i < kNumMetrics; ++i) {
157 if (plot_information_[i].plot && 165 if (plot_information_[i].plot &&
158 now_ms_ - plot_information_[i].last_plot_ms >= 166 now_ms_ - plot_information_[i].last_plot_ms >=
159 plot_information_[i].plot_interval_ms) { 167 plot_information_[i].plot_interval_ms) {
160 PlotDynamics(i); 168 PlotDynamics(i);
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 437
430 void MetricRecorder::ResumeFlow(int64_t paused_time_ms) { 438 void MetricRecorder::ResumeFlow(int64_t paused_time_ms) {
431 UpdateTime(now_ms_ + paused_time_ms); 439 UpdateTime(now_ms_ + paused_time_ms);
432 PlotZero(); 440 PlotZero();
433 link_share_->ResumeFlow(flow_id_); 441 link_share_->ResumeFlow(flow_id_);
434 } 442 }
435 443
436 } // namespace bwe 444 } // namespace bwe
437 } // namespace testing 445 } // namespace testing
438 } // namespace webrtc 446 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698