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

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

Issue 2456373002: Update BWE_TEST_LOGGING_PLOT output format, and fix plot_dynamics.py script. (Closed)
Patch Set: Suppress warnings about unused variable. Created 4 years, 1 month 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 webrtc::testing::bwe::Logging::GetInstance()->Log(format, _1, _2, _3, \ 176 webrtc::testing::bwe::Logging::GetInstance()->Log(format, _1, _2, _3, \
177 _4); \ 177 _4); \
178 } while (0) 178 } while (0)
179 #define BWE_TEST_LOGGING_LOG5(name, format, _1, _2, _3, _4, _5) \ 179 #define BWE_TEST_LOGGING_LOG5(name, format, _1, _2, _3, _4, _5) \
180 do {\ 180 do {\
181 BWE_TEST_LOGGING_CONTEXT(name); \ 181 BWE_TEST_LOGGING_CONTEXT(name); \
182 webrtc::testing::bwe::Logging::GetInstance()->Log(format, _1, _2, _3, \ 182 webrtc::testing::bwe::Logging::GetInstance()->Log(format, _1, _2, _3, \
183 _4, _5); \ 183 _4, _5); \
184 } while (0) 184 } while (0)
185 185
186 #define BWE_TEST_LOGGING_PLOT(figure, name, time, value) \ 186 #define BWE_TEST_LOGGING_PLOT(figure, name, time, value) \
187 do { \ 187 do { \
188 __BWE_TEST_LOGGING_CONTEXT_DECLARE(__bwe_log_, __PLOT__, name, \ 188 __BWE_TEST_LOGGING_CONTEXT_DECLARE(__bwe_log_, __PLOT__, name, \
189 static_cast<int64_t>(time), true); \ 189 static_cast<int64_t>(time), true); \
190 webrtc::testing::bwe::Logging::GetInstance()->Plot(figure, value); \ 190 webrtc::testing::bwe::Logging::GetInstance()->Plot(figure, name, value); \
191 } while (0) 191 } while (0)
192 192
193 #define BWE_TEST_LOGGING_PLOT_WITH_NAME(figure, name, time, value, alg_name) \ 193 #define BWE_TEST_LOGGING_PLOT_WITH_NAME(figure, name, time, value, alg_name) \
194 do { \ 194 do { \
195 __BWE_TEST_LOGGING_CONTEXT_DECLARE(__bwe_log_, __PLOT__, name, \ 195 __BWE_TEST_LOGGING_CONTEXT_DECLARE(__bwe_log_, __PLOT__, name, \
196 static_cast<int64_t>(time), true); \ 196 static_cast<int64_t>(time), true); \
197 webrtc::testing::bwe::Logging::GetInstance()->Plot(figure, value, \ 197 webrtc::testing::bwe::Logging::GetInstance()->Plot(figure, name, value, \
198 alg_name); \ 198 alg_name); \
199 } while (0) 199 } while (0)
200 200
201 #define BWE_TEST_LOGGING_PLOT_WITH_SSRC(figure, name, time, value, ssrc) \ 201 #define BWE_TEST_LOGGING_PLOT_WITH_SSRC(figure, name, time, value, ssrc) \
202 do { \ 202 do { \
203 __BWE_TEST_LOGGING_CONTEXT_DECLARE(__bwe_log_, __PLOT__, name, \ 203 __BWE_TEST_LOGGING_CONTEXT_DECLARE(__bwe_log_, __PLOT__, name, \
204 static_cast<int64_t>(time), true); \ 204 static_cast<int64_t>(time), true); \
205 webrtc::testing::bwe::Logging::GetInstance()->Plot(figure, value, ssrc); \ 205 webrtc::testing::bwe::Logging::GetInstance()->Plot(figure, name, value, \
206 ssrc); \
206 } while (0) 207 } while (0)
207 208
208 #define BWE_TEST_LOGGING_PLOT_WITH_NAME_AND_SSRC(figure, name, time, value, \ 209 #define BWE_TEST_LOGGING_PLOT_WITH_NAME_AND_SSRC(figure, name, time, value, \
209 ssrc, alg_name) \ 210 ssrc, alg_name) \
210 do { \ 211 do { \
211 __BWE_TEST_LOGGING_CONTEXT_DECLARE(__bwe_log_, __PLOT__, name, \ 212 __BWE_TEST_LOGGING_CONTEXT_DECLARE(__bwe_log_, __PLOT__, name, \
212 static_cast<int64_t>(time), true); \ 213 static_cast<int64_t>(time), true); \
213 webrtc::testing::bwe::Logging::GetInstance()->Plot(figure, value, ssrc, \ 214 webrtc::testing::bwe::Logging::GetInstance()->Plot(figure, name, value, \
214 alg_name); \ 215 ssrc, alg_name); \
215 } while (0) 216 } while (0)
216 217
217 #define BWE_TEST_LOGGING_BAR(figure, name, value, flow_id) \ 218 #define BWE_TEST_LOGGING_BAR(figure, name, value, flow_id) \
218 do { \ 219 do { \
219 BWE_TEST_LOGGING_CONTEXT(name); \ 220 BWE_TEST_LOGGING_CONTEXT(name); \
220 webrtc::testing::bwe::Logging::GetInstance()->PlotBar(figure, name, value, \ 221 webrtc::testing::bwe::Logging::GetInstance()->PlotBar(figure, name, value, \
221 flow_id); \ 222 flow_id); \
222 } while (0) 223 } while (0)
223 224
224 #define BWE_TEST_LOGGING_BASELINEBAR(figure, name, value, flow_id) \ 225 #define BWE_TEST_LOGGING_BASELINEBAR(figure, name, value, flow_id) \
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 }; 273 };
273 274
274 static Logging* GetInstance(); 275 static Logging* GetInstance();
275 276
276 void SetGlobalContext(uint32_t name); 277 void SetGlobalContext(uint32_t name);
277 void SetGlobalContext(const std::string& name); 278 void SetGlobalContext(const std::string& name);
278 void SetGlobalContext(const char* name); 279 void SetGlobalContext(const char* name);
279 void SetGlobalEnable(bool enabled); 280 void SetGlobalEnable(bool enabled);
280 281
281 void Log(const char format[], ...); 282 void Log(const char format[], ...);
282 void Plot(int figure, double value); 283 void Plot(int figure, const std::string& name, double value);
283 void Plot(int figure, double value, const std::string& alg_name);
284 void Plot(int figure, double value, uint32_t ssrc);
285 void Plot(int figure, 284 void Plot(int figure,
285 const std::string& name,
286 double value,
287 const std::string& alg_name);
288 void Plot(int figure, const std::string& name, double value, uint32_t ssrc);
289 void Plot(int figure,
290 const std::string& name,
286 double value, 291 double value,
287 uint32_t ssrc, 292 uint32_t ssrc,
288 const std::string& alg_name); 293 const std::string& alg_name);
289 void PlotBar(int figure, const std::string& name, double value, int flow_id); 294 void PlotBar(int figure, const std::string& name, double value, int flow_id);
290 void PlotBaselineBar(int figure, 295 void PlotBaselineBar(int figure,
291 const std::string& name, 296 const std::string& name,
292 double value, 297 double value,
293 int flow_id); 298 int flow_id);
294 void PlotErrorBar(int figure, 299 void PlotErrorBar(int figure,
295 const std::string& name, 300 const std::string& name,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 ThreadMap thread_map_; 344 ThreadMap thread_map_;
340 345
341 RTC_DISALLOW_COPY_AND_ASSIGN(Logging); 346 RTC_DISALLOW_COPY_AND_ASSIGN(Logging);
342 }; 347 };
343 } // namespace bwe 348 } // namespace bwe
344 } // namespace testing 349 } // namespace testing
345 } // namespace webrtc 350 } // namespace webrtc
346 351
347 #endif // BWE_TEST_LOGGING_COMPILE_TIME_ENABLE 352 #endif // BWE_TEST_LOGGING_COMPILE_TIME_ENABLE
348 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_BWE_TEST_LOGGING_H_ 353 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_BWE_TEST_LOGGING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698