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

Unified Diff: webrtc/tools/event_log_visualizer/main.cc

Issue 2874403003: Remove gflags dependency for event_log_visualizer and activity_metric (Closed)
Patch Set: Implemented --help flag Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/tools/agc/activity_metric.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/tools/event_log_visualizer/main.cc
diff --git a/webrtc/tools/event_log_visualizer/main.cc b/webrtc/tools/event_log_visualizer/main.cc
index 2f5ecd63e45f67bc4e12ac4910d5593393c57660..b9edd99fa3339f47f5289d802d08f72560bbaf54 100644
--- a/webrtc/tools/event_log_visualizer/main.cc
+++ b/webrtc/tools/event_log_visualizer/main.cc
@@ -10,7 +10,7 @@
#include <iostream>
-#include "gflags/gflags.h"
+#include "webrtc/base/flags.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"
@@ -84,6 +84,7 @@ DEFINE_string(
"E.g. running with --force_fieldtrials=WebRTC-FooFeature/Enabled/"
" will assign the group Enabled to field trial WebRTC-FooFeature. Multiple "
"trials are separated by \"/\"");
+DEFINE_bool(help, false, "prints this message");
int main(int argc, char* argv[]) {
std::string program_name = argv[0];
@@ -92,16 +93,19 @@ int main(int argc, char* argv[]) {
"Example usage:\n" +
program_name + " <logfile> | python\n" + "Run " + program_name +
" --help for a list of command line options\n";
- google::SetUsageMessage(usage);
- google::ParseCommandLineFlags(&argc, &argv, true);
+ rtc::FlagList::SetFlagsFromCommandLine(&argc, argv, true);
+ if (FLAG_help) {
+ rtc::FlagList::Print(nullptr, false);
+ return 0;
+ }
if (argc != 2) {
// Print usage information.
- std::cout << google::ProgramUsage();
+ std::cout << usage;
return 0;
}
- webrtc::test::InitFieldTrialsFromString(FLAGS_force_fieldtrials);
+ webrtc::test::InitFieldTrialsFromString(FLAG_force_fieldtrials);
std::string filename = argv[1];
@@ -118,15 +122,15 @@ int main(int argc, char* argv[]) {
std::unique_ptr<webrtc::plotting::PlotCollection> collection(
new webrtc::plotting::PythonPlotCollection());
- if (FLAGS_plot_all || FLAGS_plot_packets) {
- if (FLAGS_incoming) {
+ if (FLAG_plot_all || FLAG_plot_packets) {
+ if (FLAG_incoming) {
analyzer.CreatePacketGraph(webrtc::PacketDirection::kIncomingPacket,
collection->AppendNewPlot());
analyzer.CreateAccumulatedPacketsGraph(
webrtc::PacketDirection::kIncomingPacket,
collection->AppendNewPlot());
}
- if (FLAGS_outgoing) {
+ if (FLAG_outgoing) {
analyzer.CreatePacketGraph(webrtc::PacketDirection::kOutgoingPacket,
collection->AppendNewPlot());
analyzer.CreateAccumulatedPacketsGraph(
@@ -135,95 +139,95 @@ int main(int argc, char* argv[]) {
}
}
- if (FLAGS_plot_all || FLAGS_plot_audio_playout) {
+ if (FLAG_plot_all || FLAG_plot_audio_playout) {
analyzer.CreatePlayoutGraph(collection->AppendNewPlot());
}
- if (FLAGS_plot_all || FLAGS_plot_audio_level) {
+ if (FLAG_plot_all || FLAG_plot_audio_level) {
analyzer.CreateAudioLevelGraph(collection->AppendNewPlot());
}
- if (FLAGS_plot_all || FLAGS_plot_sequence_number) {
- if (FLAGS_incoming) {
+ if (FLAG_plot_all || FLAG_plot_sequence_number) {
+ if (FLAG_incoming) {
analyzer.CreateSequenceNumberGraph(collection->AppendNewPlot());
}
}
- if (FLAGS_plot_all || FLAGS_plot_delay_change) {
- if (FLAGS_incoming) {
+ if (FLAG_plot_all || FLAG_plot_delay_change) {
+ if (FLAG_incoming) {
analyzer.CreateDelayChangeGraph(collection->AppendNewPlot());
}
}
- if (FLAGS_plot_all || FLAGS_plot_accumulated_delay_change) {
- if (FLAGS_incoming) {
+ if (FLAG_plot_all || FLAG_plot_accumulated_delay_change) {
+ if (FLAG_incoming) {
analyzer.CreateAccumulatedDelayChangeGraph(collection->AppendNewPlot());
}
}
- if (FLAGS_plot_all || FLAGS_plot_fraction_loss) {
+ if (FLAG_plot_all || FLAG_plot_fraction_loss) {
analyzer.CreateFractionLossGraph(collection->AppendNewPlot());
analyzer.CreateIncomingPacketLossGraph(collection->AppendNewPlot());
}
- if (FLAGS_plot_all || FLAGS_plot_total_bitrate) {
- if (FLAGS_incoming) {
+ if (FLAG_plot_all || FLAG_plot_total_bitrate) {
+ if (FLAG_incoming) {
analyzer.CreateTotalBitrateGraph(webrtc::PacketDirection::kIncomingPacket,
collection->AppendNewPlot());
}
- if (FLAGS_outgoing) {
+ if (FLAG_outgoing) {
analyzer.CreateTotalBitrateGraph(webrtc::PacketDirection::kOutgoingPacket,
collection->AppendNewPlot());
}
}
- if (FLAGS_plot_all || FLAGS_plot_stream_bitrate) {
- if (FLAGS_incoming) {
+ if (FLAG_plot_all || FLAG_plot_stream_bitrate) {
+ if (FLAG_incoming) {
analyzer.CreateStreamBitrateGraph(
webrtc::PacketDirection::kIncomingPacket,
collection->AppendNewPlot());
}
- if (FLAGS_outgoing) {
+ if (FLAG_outgoing) {
analyzer.CreateStreamBitrateGraph(
webrtc::PacketDirection::kOutgoingPacket,
collection->AppendNewPlot());
}
}
- if (FLAGS_plot_all || FLAGS_plot_bwe) {
+ if (FLAG_plot_all || FLAG_plot_bwe) {
analyzer.CreateBweSimulationGraph(collection->AppendNewPlot());
}
- if (FLAGS_plot_all || FLAGS_plot_network_delay_feedback) {
+ if (FLAG_plot_all || FLAG_plot_network_delay_feedback) {
analyzer.CreateNetworkDelayFeedbackGraph(collection->AppendNewPlot());
}
- if (FLAGS_plot_all || FLAGS_plot_timestamps) {
+ if (FLAG_plot_all || FLAG_plot_timestamps) {
analyzer.CreateTimestampGraph(collection->AppendNewPlot());
}
- if (FLAGS_plot_all || FLAGS_audio_encoder_bitrate_bps) {
+ if (FLAG_plot_all || FLAG_audio_encoder_bitrate_bps) {
analyzer.CreateAudioEncoderTargetBitrateGraph(collection->AppendNewPlot());
}
- if (FLAGS_plot_all || FLAGS_audio_encoder_frame_length_ms) {
+ if (FLAG_plot_all || FLAG_audio_encoder_frame_length_ms) {
analyzer.CreateAudioEncoderFrameLengthGraph(collection->AppendNewPlot());
}
- if (FLAGS_plot_all || FLAGS_audio_encoder_uplink_packet_loss_fraction) {
+ if (FLAG_plot_all || FLAG_audio_encoder_uplink_packet_loss_fraction) {
analyzer.CreateAudioEncoderUplinkPacketLossFractionGraph(
collection->AppendNewPlot());
}
- if (FLAGS_plot_all || FLAGS_audio_encoder_fec) {
+ if (FLAG_plot_all || FLAG_audio_encoder_fec) {
analyzer.CreateAudioEncoderEnableFecGraph(collection->AppendNewPlot());
}
- if (FLAGS_plot_all || FLAGS_audio_encoder_dtx) {
+ if (FLAG_plot_all || FLAG_audio_encoder_dtx) {
analyzer.CreateAudioEncoderEnableDtxGraph(collection->AppendNewPlot());
}
- if (FLAGS_plot_all || FLAGS_audio_encoder_num_channels) {
+ if (FLAG_plot_all || FLAG_audio_encoder_num_channels) {
analyzer.CreateAudioEncoderNumChannelsGraph(collection->AppendNewPlot());
}
« no previous file with comments | « webrtc/tools/agc/activity_metric.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698