| Index: webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h
|
| diff --git a/webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h b/webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h
|
| index c214d70c27e145efa7081d0e2a79f33c0b161405..23fce00d8cdd8402bb114ce57b947bbcc159ce3d 100644
|
| --- a/webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h
|
| +++ b/webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h
|
| @@ -91,7 +91,31 @@
|
| // |name| is a char*, std::string or uint32_t to name the plotted value.
|
| // |time| is an int64_t time in ms, or -1 to inherit time from previous context.
|
| // |value| is a double precision float to be plotted.
|
| +// |alg_name| is an optional argument, a string
|
| #define BWE_TEST_LOGGING_PLOT(figure, name, time, value)
|
| +#define BWE_TEST_LOGGING_PLOT_WITH_NAME(figure, name, time, value, alg_name)
|
| +
|
| +// Print to stdout in tab-separated format suitable for plotting, e.g.:
|
| +// BAR figure Context1_Context2_Name x_left width value
|
| +// |figure| is a figure id. Different figures are plotted in different windows.
|
| +// |name| is a char*, std::string or uint32_t to name the plotted value.
|
| +// |value| is a double precision float to be plotted.
|
| +// |ylow| and |yhigh| are double precision float for the error line.
|
| +// |title| is a string and refers to the error label.
|
| +// |ymax| is a double precision float for the limit horizontal line.
|
| +// |limit_title| is a string and refers to the limit label.
|
| +#define BWE_TEST_LOGGING_BAR(figure, name, value, flow_id)
|
| +#define BWE_TEST_LOGGING_ERRORBAR(figure, name, value, ylow, yhigh, \
|
| + error_title, flow_id)
|
| +#define BWE_TEST_LOGGING_LIMITERRORBAR( \
|
| + figure, name, value, ylow, yhigh, error_title, ymax, limit_title, flow_id)
|
| +
|
| +#define BWE_TEST_LOGGING_BASELINEBAR(figure, name, value, flow_id)
|
| +
|
| +// |num_flows| is an integer refering to the number of RMCAT flows in the
|
| +// scenario.
|
| +// Define |x_label| and |y_label| for plots.
|
| +#define BWE_TEST_LOGGING_LABEL(figure, x_label, y_label, num_flows)
|
|
|
| #else // BWE_TEST_LOGGING_COMPILE_TIME_ENABLE
|
|
|
| @@ -157,11 +181,57 @@
|
|
|
| #define BWE_TEST_LOGGING_PLOT(figure, name, time, value) \
|
| do { \
|
| - __BWE_TEST_LOGGING_CONTEXT_DECLARE(__bwe_log_, __LINE__, name, \
|
| + __BWE_TEST_LOGGING_CONTEXT_DECLARE(__bwe_log_, __PLOT__, name, \
|
| static_cast<int64_t>(time), true); \
|
| webrtc::testing::bwe::Logging::GetInstance()->Plot(figure, value); \
|
| } while (0);
|
|
|
| +#define BWE_TEST_LOGGING_PLOT_WITH_NAME(figure, name, time, value, alg_name) \
|
| + do { \
|
| + __BWE_TEST_LOGGING_CONTEXT_DECLARE(__bwe_log_, __PLOT__, name, \
|
| + static_cast<int64_t>(time), true); \
|
| + webrtc::testing::bwe::Logging::GetInstance()->Plot(figure, value, \
|
| + alg_name); \
|
| + } while (0);
|
| +
|
| +#define BWE_TEST_LOGGING_BAR(figure, name, value, flow_id) \
|
| + do { \
|
| + BWE_TEST_LOGGING_CONTEXT(name); \
|
| + webrtc::testing::bwe::Logging::GetInstance()->PlotBar(figure, name, value, \
|
| + flow_id); \
|
| + } while (0);
|
| +
|
| +#define BWE_TEST_LOGGING_BASELINEBAR(figure, name, value, flow_id) \
|
| + do { \
|
| + BWE_TEST_LOGGING_CONTEXT(name); \
|
| + webrtc::testing::bwe::Logging::GetInstance()->PlotBaselineBar( \
|
| + figure, name, value, flow_id); \
|
| + } while (0);
|
| +
|
| +#define BWE_TEST_LOGGING_ERRORBAR(figure, name, value, ylow, yhigh, title, \
|
| + flow_id) \
|
| + do { \
|
| + BWE_TEST_LOGGING_CONTEXT(name); \
|
| + webrtc::testing::bwe::Logging::GetInstance()->PlotErrorBar( \
|
| + figure, name, value, ylow, yhigh, title, flow_id); \
|
| + } while (0);
|
| +
|
| +#define BWE_TEST_LOGGING_LIMITERRORBAR( \
|
| + figure, name, value, ylow, yhigh, error_title, ymax, limit_title, flow_id) \
|
| + do { \
|
| + BWE_TEST_LOGGING_CONTEXT(name); \
|
| + webrtc::testing::bwe::Logging::GetInstance()->PlotLimitErrorBar( \
|
| + figure, name, value, ylow, yhigh, error_title, ymax, limit_title, \
|
| + flow_id); \
|
| + } while (0);
|
| +
|
| +#define BWE_TEST_LOGGING_LABEL(figure, title, y_label, num_flows) \
|
| + do { \
|
| + BWE_TEST_LOGGING_CONTEXT(title); \
|
| + webrtc::testing::bwe::Logging::GetInstance()->PlotLabel( \
|
| + figure, title, y_label, num_flows); \
|
| + } while (0);
|
| +
|
| namespace webrtc {
|
|
|
| class CriticalSectionWrapper;
|
| @@ -190,6 +260,33 @@ class Logging {
|
|
|
| void Log(const char format[], ...);
|
| void Plot(int figure, double value);
|
| + void Plot(int figure, double value, const std::string& alg_name);
|
| + void PlotBar(int figure, const std::string& name, double value, int flow_id);
|
| + void PlotBaselineBar(int figure,
|
| + const std::string& name,
|
| + double value,
|
| + int flow_id);
|
| + void PlotErrorBar(int figure,
|
| + const std::string& name,
|
| + double value,
|
| + double ylow,
|
| + double yhigh,
|
| + const std::string& error_title,
|
| + int flow_id);
|
| +
|
| + void PlotLimitErrorBar(int figure,
|
| + const std::string& name,
|
| + double value,
|
| + double ylow,
|
| + double yhigh,
|
| + const std::string& error_title,
|
| + double ymax,
|
| + const std::string& limit_title,
|
| + int flow_id);
|
| + void PlotLabel(int figure,
|
| + const std::string& title,
|
| + const std::string& y_label,
|
| + int num_flows);
|
|
|
| private:
|
| struct State {
|
|
|