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

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: minor change to gyp files Created 4 years, 3 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 10
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, ssrc); \
202 } while (0)
203
204 #define BWE_TEST_LOGGING_PLOT_WITH_NAME_AND_SSRC(figure, name, time, value, \
205 ssrc, alg_name) \
206 do { \
207 __BWE_TEST_LOGGING_CONTEXT_DECLARE(__bwe_log_, __PLOT__, name, \
208 static_cast<int64_t>(time), true); \
209 webrtc::testing::bwe::Logging::GetInstance()->Plot(figure, value, ssrc, \
210 alg_name); \
211 } while (0)
212
197 #define BWE_TEST_LOGGING_BAR(figure, name, value, flow_id) \ 213 #define BWE_TEST_LOGGING_BAR(figure, name, value, flow_id) \
198 do { \ 214 do { \
199 BWE_TEST_LOGGING_CONTEXT(name); \ 215 BWE_TEST_LOGGING_CONTEXT(name); \
200 webrtc::testing::bwe::Logging::GetInstance()->PlotBar(figure, name, value, \ 216 webrtc::testing::bwe::Logging::GetInstance()->PlotBar(figure, name, value, \
201 flow_id); \ 217 flow_id); \
202 } while (0) 218 } while (0)
203 219
204 #define BWE_TEST_LOGGING_BASELINEBAR(figure, name, value, flow_id) \ 220 #define BWE_TEST_LOGGING_BASELINEBAR(figure, name, value, flow_id) \
205 do { \ 221 do { \
206 BWE_TEST_LOGGING_CONTEXT(name); \ 222 BWE_TEST_LOGGING_CONTEXT(name); \
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 static Logging* GetInstance(); 270 static Logging* GetInstance();
255 271
256 void SetGlobalContext(uint32_t name); 272 void SetGlobalContext(uint32_t name);
257 void SetGlobalContext(const std::string& name); 273 void SetGlobalContext(const std::string& name);
258 void SetGlobalContext(const char* name); 274 void SetGlobalContext(const char* name);
259 void SetGlobalEnable(bool enabled); 275 void SetGlobalEnable(bool enabled);
260 276
261 void Log(const char format[], ...); 277 void Log(const char format[], ...);
262 void Plot(int figure, double value); 278 void Plot(int figure, double value);
263 void Plot(int figure, double value, const std::string& alg_name); 279 void Plot(int figure, double value, const std::string& alg_name);
280 void Plot(int figure, double value, uint32_t ssrc);
281 void Plot(int figure,
282 double value,
283 uint32_t ssrc,
284 const std::string& alg_name);
264 void PlotBar(int figure, const std::string& name, double value, int flow_id); 285 void PlotBar(int figure, const std::string& name, double value, int flow_id);
265 void PlotBaselineBar(int figure, 286 void PlotBaselineBar(int figure,
266 const std::string& name, 287 const std::string& name,
267 double value, 288 double value,
268 int flow_id); 289 int flow_id);
269 void PlotErrorBar(int figure, 290 void PlotErrorBar(int figure,
270 const std::string& name, 291 const std::string& name,
271 double value, 292 double value,
272 double ylow, 293 double ylow,
273 double yhigh, 294 double yhigh,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 ThreadMap thread_map_; 335 ThreadMap thread_map_;
315 336
316 RTC_DISALLOW_COPY_AND_ASSIGN(Logging); 337 RTC_DISALLOW_COPY_AND_ASSIGN(Logging);
317 }; 338 };
318 } // namespace bwe 339 } // namespace bwe
319 } // namespace testing 340 } // namespace testing
320 } // namespace webrtc 341 } // namespace webrtc
321 342
322 #endif // BWE_TEST_LOGGING_COMPILE_TIME_ENABLE 343 #endif // BWE_TEST_LOGGING_COMPILE_TIME_ENABLE
323 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_BWE_TEST_LOGGING_H_ 344 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_BWE_TEST_LOGGING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698