Allow printing graphs as protobuf in event_log_visualizer.
event_log_visualizer --protobuf_output <file>
will print a binary protobuf description of the graphs.
Also piggy-backing a couple of trivial spelling fixes in the same CL.
Bug: None
Change-Id: Ib000aa2706de51659ee72f13b773c4394edafe3e
Reviewed-on: https://webrtc-review.googlesource.com/99320
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24675}
diff --git a/rtc_tools/event_log_visualizer/main.cc b/rtc_tools/event_log_visualizer/main.cc
index fb497db..4e5534e 100644
--- a/rtc_tools/event_log_visualizer/main.cc
+++ b/rtc_tools/event_log_visualizer/main.cc
@@ -14,6 +14,7 @@
#include "rtc_base/flags.h"
#include "rtc_tools/event_log_visualizer/analyzer.h"
#include "rtc_tools/event_log_visualizer/plot_base.h"
+#include "rtc_tools/event_log_visualizer/plot_protobuf.h"
#include "rtc_tools/event_log_visualizer/plot_python.h"
#include "system_wrappers/include/field_trial_default.h"
#include "test/field_trial.h"
@@ -161,6 +162,10 @@
true,
"Normalize the log timestamps so that the call starts at time 0.");
+DEFINE_bool(protobuf_output,
+ false,
+ "Output charts as protobuf instead of python code.");
+
void SetAllPlotFlags(bool setting);
int main(int argc, char* argv[]) {
@@ -237,8 +242,12 @@
}
webrtc::EventLogAnalyzer analyzer(parsed_log, FLAG_normalize_time);
- std::unique_ptr<webrtc::PlotCollection> collection(
- new webrtc::PythonPlotCollection());
+ std::unique_ptr<webrtc::PlotCollection> collection;
+ if (FLAG_protobuf_output) {
+ collection.reset(new webrtc::ProtobufPlotCollection());
+ } else {
+ collection.reset(new webrtc::PythonPlotCollection());
+ }
if (FLAG_plot_incoming_packet_sizes) {
analyzer.CreatePacketGraph(webrtc::kIncomingPacket,
@@ -343,11 +352,11 @@
};
analyzer.CreateSenderAndReceiverReportPlot(
webrtc::kIncomingPacket, GetHighestSeqNumber,
- "Highest sequence number (incoming RTCP)", "Seqence number",
+ "Highest sequence number (incoming RTCP)", "Sequence number",
collection->AppendNewPlot());
analyzer.CreateSenderAndReceiverReportPlot(
webrtc::kOutgoingPacket, GetHighestSeqNumber,
- "Highest sequence number (outgoing RTCP)", "Seqence number",
+ "Highest sequence number (outgoing RTCP)", "Sequence number",
collection->AppendNewPlot());
auto DelaySinceLastSr =