Chromium Code Reviews

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h

Issue 2296253002: Enable BWE logging to command line when rtc_enable_bwe_test_logging is set to true (Closed)
Patch Set: Added plot function which considers ssrc Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 10
(...skipping 176 matching lines...)
187 } while (0) 187 } while (0)
188 188
189 #define BWE_TEST_LOGGING_PLOT_WITH_NAME(figure, name, time, value, alg_name) \ 189 #define BWE_TEST_LOGGING_PLOT_WITH_NAME(figure, name, time, value, alg_name) \
190 do { \ 190 do { \
191 __BWE_TEST_LOGGING_CONTEXT_DECLARE(__bwe_log_, __PLOT__, name, \ 191 __BWE_TEST_LOGGING_CONTEXT_DECLARE(__bwe_log_, __PLOT__, name, \
192 static_cast<int64_t>(time), true); \ 192 static_cast<int64_t>(time), true); \
193 webrtc::testing::bwe::Logging::GetInstance()->Plot(figure, value, \ 193 webrtc::testing::bwe::Logging::GetInstance()->Plot(figure, value, \
194 alg_name); \ 194 alg_name); \
195 } while (0) 195 } while (0)
196 196
197 #define BWE_TEST_LOGGING_PLOT_WITH_SSRC(figure, name, time, value, ssrc) \
198 do { \
199 __BWE_TEST_LOGGING_CONTEXT_DECLARE(__bwe_log_, __PLOT__, name, \
200 static_cast<int64_t>(time), true); \
201 webrtc::testing::bwe::Logging::GetInstance()->Plot(figure, value, \
202 ssrc); \
203 } while (0)
204
205 #define BWE_TEST_LOGGING_PLOT_WITH_NAME_AND_SSRC(figure, name, \
206 time, value, ssrc, alg_name) \
207 do { \
208 __BWE_TEST_LOGGING_CONTEXT_DECLARE(__bwe_log_, __PLOT__, name, \
209 static_cast<int64_t>(time), true); \
210 webrtc::testing::bwe::Logging::GetInstance()->Plot(figure, value, \
211 ssrc, alg_name); \
212 } while (0)
213
197 #define BWE_TEST_LOGGING_BAR(figure, name, value, flow_id) \ 214 #define BWE_TEST_LOGGING_BAR(figure, name, value, flow_id) \
198 do { \ 215 do { \
199 BWE_TEST_LOGGING_CONTEXT(name); \ 216 BWE_TEST_LOGGING_CONTEXT(name); \
200 webrtc::testing::bwe::Logging::GetInstance()->PlotBar(figure, name, value, \ 217 webrtc::testing::bwe::Logging::GetInstance()->PlotBar(figure, name, value, \
201 flow_id); \ 218 flow_id); \
202 } while (0) 219 } while (0)
203 220
204 #define BWE_TEST_LOGGING_BASELINEBAR(figure, name, value, flow_id) \ 221 #define BWE_TEST_LOGGING_BASELINEBAR(figure, name, value, flow_id) \
205 do { \ 222 do { \
206 BWE_TEST_LOGGING_CONTEXT(name); \ 223 BWE_TEST_LOGGING_CONTEXT(name); \
(...skipping 47 matching lines...)
254 static Logging* GetInstance(); 271 static Logging* GetInstance();
255 272
256 void SetGlobalContext(uint32_t name); 273 void SetGlobalContext(uint32_t name);
257 void SetGlobalContext(const std::string& name); 274 void SetGlobalContext(const std::string& name);
258 void SetGlobalContext(const char* name); 275 void SetGlobalContext(const char* name);
259 void SetGlobalEnable(bool enabled); 276 void SetGlobalEnable(bool enabled);
260 277
261 void Log(const char format[], ...); 278 void Log(const char format[], ...);
262 void Plot(int figure, double value); 279 void Plot(int figure, double value);
263 void Plot(int figure, double value, const std::string& alg_name); 280 void Plot(int figure, double value, const std::string& alg_name);
281 void Plot(int figure, double value, uint32_t ssrc);
282 void Plot(int figure,
283 double value,
284 uint32_t ssrc,
285 const std::string& alg_name);
264 void PlotBar(int figure, const std::string& name, double value, int flow_id); 286 void PlotBar(int figure, const std::string& name, double value, int flow_id);
265 void PlotBaselineBar(int figure, 287 void PlotBaselineBar(int figure,
266 const std::string& name, 288 const std::string& name,
267 double value, 289 double value,
268 int flow_id); 290 int flow_id);
269 void PlotErrorBar(int figure, 291 void PlotErrorBar(int figure,
270 const std::string& name, 292 const std::string& name,
271 double value, 293 double value,
272 double ylow, 294 double ylow,
273 double yhigh, 295 double yhigh,
(...skipping 40 matching lines...)
314 ThreadMap thread_map_; 336 ThreadMap thread_map_;
315 337
316 RTC_DISALLOW_COPY_AND_ASSIGN(Logging); 338 RTC_DISALLOW_COPY_AND_ASSIGN(Logging);
317 }; 339 };
318 } // namespace bwe 340 } // namespace bwe
319 } // namespace testing 341 } // namespace testing
320 } // namespace webrtc 342 } // namespace webrtc
321 343
322 #endif // BWE_TEST_LOGGING_COMPILE_TIME_ENABLE 344 #endif // BWE_TEST_LOGGING_COMPILE_TIME_ENABLE
323 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_BWE_TEST_LOGGING_H_ 345 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_BWE_TEST_LOGGING_H_
OLDNEW

Powered by Google App Engine