Add support for field trials to event log visualizer.
BUG=None
Review-Url: https://codereview.webrtc.org/2499283002
Cr-Commit-Position: refs/heads/master@{#15086}
diff --git a/webrtc/tools/event_log_visualizer/main.cc b/webrtc/tools/event_log_visualizer/main.cc
index b487696..ce8feea 100644
--- a/webrtc/tools/event_log_visualizer/main.cc
+++ b/webrtc/tools/event_log_visualizer/main.cc
@@ -12,6 +12,7 @@
#include "gflags/gflags.h"
#include "webrtc/logging/rtc_event_log/rtc_event_log_parser.h"
+#include "webrtc/test/field_trial.h"
#include "webrtc/tools/event_log_visualizer/analyzer.h"
#include "webrtc/tools/event_log_visualizer/plot_base.h"
#include "webrtc/tools/event_log_visualizer/plot_python.h"
@@ -58,6 +59,13 @@
false,
"Plot packet loss in percent for outgoing packets (as perceived by "
"the send-side bandwidth estimator).");
+DEFINE_string(
+ force_fieldtrials,
+ "",
+ "Field trials control experimental feature code which can be forced. "
+ "E.g. running with --force_fieldtrials=WebRTC-FooFeature/Enabled/"
+ " will assign the group Enabled to field trial WebRTC-FooFeature. Multiple "
+ "trials are separated by \"/\"");
int main(int argc, char* argv[]) {
std::string program_name = argv[0];
@@ -75,6 +83,8 @@
return 0;
}
+ webrtc::test::InitFieldTrialsFromString(FLAGS_force_fieldtrials);
+
std::string filename = argv[1];
webrtc::ParsedRtcEventLog parsed_log;