terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
Yves Gerey | 3e70781 | 2018-11-28 16:47:49 +0100 | [diff] [blame] | 11 | #include <stdio.h> |
| 12 | #include <string.h> |
Jonas Olsson | 5b2eda4 | 2019-06-11 14:29:40 +0200 | [diff] [blame] | 13 | |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 14 | #include <iostream> |
Yves Gerey | 3e70781 | 2018-11-28 16:47:49 +0100 | [diff] [blame] | 15 | #include <map> |
| 16 | #include <memory> |
| 17 | #include <string> |
| 18 | #include <utility> |
Mirko Bonadei | 4b091f4 | 2019-07-16 11:55:08 +0200 | [diff] [blame] | 19 | #include <vector> |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 20 | |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 21 | #include "absl/algorithm/container.h" |
Mirko Bonadei | 4b091f4 | 2019-07-16 11:55:08 +0200 | [diff] [blame] | 22 | #include "absl/flags/flag.h" |
| 23 | #include "absl/flags/parse.h" |
Mirko Bonadei | f2d97b8 | 2019-07-24 15:29:47 +0200 | [diff] [blame] | 24 | #include "absl/flags/usage.h" |
| 25 | #include "absl/flags/usage_config.h" |
| 26 | #include "absl/strings/match.h" |
Ivo Creusen | 3ce44a3 | 2019-10-31 14:38:11 +0100 | [diff] [blame] | 27 | #include "api/neteq/neteq.h" |
Danil Chapovalov | 83bbe91 | 2019-08-07 12:24:53 +0200 | [diff] [blame] | 28 | #include "api/rtc_event_log/rtc_event_log.h" |
Sebastian Jansson | b290a6d | 2019-01-03 14:46:23 +0100 | [diff] [blame] | 29 | #include "logging/rtc_event_log/rtc_event_log_parser.h" |
Yves Gerey | 3e70781 | 2018-11-28 16:47:49 +0100 | [diff] [blame] | 30 | #include "modules/rtp_rtcp/source/rtcp_packet/report_block.h" |
| 31 | #include "rtc_base/checks.h" |
Björn Terelius | a06048a | 2019-11-01 14:31:46 +0100 | [diff] [blame] | 32 | #include "rtc_base/logging.h" |
Mirko Bonadei | 575998c | 2019-07-25 13:57:41 +0200 | [diff] [blame] | 33 | #include "rtc_tools/rtc_event_log_visualizer/analyzer.h" |
| 34 | #include "rtc_tools/rtc_event_log_visualizer/plot_base.h" |
| 35 | #include "rtc_tools/rtc_event_log_visualizer/plot_protobuf.h" |
| 36 | #include "rtc_tools/rtc_event_log_visualizer/plot_python.h" |
Mirko Bonadei | 17f4878 | 2018-09-28 08:51:10 +0200 | [diff] [blame] | 37 | #include "system_wrappers/include/field_trial.h" |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 38 | #include "test/field_trial.h" |
Steve Anton | 10542f2 | 2019-01-11 09:11:00 -0800 | [diff] [blame] | 39 | #include "test/testsupport/file_utils.h" |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 40 | |
Mirko Bonadei | 4b091f4 | 2019-07-16 11:55:08 +0200 | [diff] [blame] | 41 | ABSL_FLAG(std::string, |
| 42 | plot, |
| 43 | "default", |
Mirko Bonadei | f2d97b8 | 2019-07-24 15:29:47 +0200 | [diff] [blame] | 44 | "A comma separated list of plot names. See --list_plots for valid " |
| 45 | "options."); |
Bjorn Terelius | 1edfff9 | 2017-10-11 13:15:19 +0200 | [diff] [blame] | 46 | |
Mirko Bonadei | 4b091f4 | 2019-07-16 11:55:08 +0200 | [diff] [blame] | 47 | ABSL_FLAG( |
| 48 | std::string, |
stefan | 985d280 | 2016-11-15 06:54:09 -0800 | [diff] [blame] | 49 | force_fieldtrials, |
| 50 | "", |
| 51 | "Field trials control experimental feature code which can be forced. " |
| 52 | "E.g. running with --force_fieldtrials=WebRTC-FooFeature/Enabled/" |
| 53 | " will assign the group Enabled to field trial WebRTC-FooFeature. Multiple " |
| 54 | "trials are separated by \"/\""); |
Mirko Bonadei | 4b091f4 | 2019-07-16 11:55:08 +0200 | [diff] [blame] | 55 | ABSL_FLAG(std::string, |
| 56 | wav_filename, |
| 57 | "", |
| 58 | "Path to wav file used for simulation of jitter buffer"); |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 59 | |
Mirko Bonadei | 4b091f4 | 2019-07-16 11:55:08 +0200 | [diff] [blame] | 60 | ABSL_FLAG(bool, |
| 61 | show_detector_state, |
| 62 | false, |
| 63 | "Show the state of the delay based BWE detector on the total " |
| 64 | "bitrate graph"); |
terelius | 2ee076d | 2017-08-15 02:04:02 -0700 | [diff] [blame] | 65 | |
Mirko Bonadei | 4b091f4 | 2019-07-16 11:55:08 +0200 | [diff] [blame] | 66 | ABSL_FLAG(bool, |
| 67 | show_alr_state, |
| 68 | false, |
| 69 | "Show the state ALR state on the total bitrate graph"); |
Ilya Nikolaevskiy | a4259f6 | 2017-12-05 13:19:45 +0100 | [diff] [blame] | 70 | |
Mirko Bonadei | 4b091f4 | 2019-07-16 11:55:08 +0200 | [diff] [blame] | 71 | ABSL_FLAG(bool, |
| 72 | parse_unconfigured_header_extensions, |
| 73 | true, |
| 74 | "Attempt to parse unconfigured header extensions using the default " |
| 75 | "WebRTC mapping. This can give very misleading results if the " |
| 76 | "application negotiates a different mapping."); |
Bjorn Terelius | c4ca1d3 | 2018-04-27 14:33:34 +0200 | [diff] [blame] | 77 | |
Mirko Bonadei | 4b091f4 | 2019-07-16 11:55:08 +0200 | [diff] [blame] | 78 | ABSL_FLAG(bool, |
| 79 | print_triage_alerts, |
| 80 | false, |
| 81 | "Print triage alerts, i.e. a list of potential problems."); |
Bjorn Terelius | 2eb3188 | 2017-11-30 15:15:25 +0100 | [diff] [blame] | 82 | |
Mirko Bonadei | 4b091f4 | 2019-07-16 11:55:08 +0200 | [diff] [blame] | 83 | ABSL_FLAG(bool, |
| 84 | normalize_time, |
| 85 | true, |
| 86 | "Normalize the log timestamps so that the call starts at time 0."); |
Stefan Holmer | 1d4a227 | 2018-05-24 13:48:09 +0200 | [diff] [blame] | 87 | |
Mirko Bonadei | 4b091f4 | 2019-07-16 11:55:08 +0200 | [diff] [blame] | 88 | ABSL_FLAG(bool, |
| 89 | shared_xaxis, |
| 90 | false, |
| 91 | "Share x-axis between all plots so that zooming in one plot " |
| 92 | "updates all the others too. A downside is that certain " |
| 93 | "operations like panning become much slower."); |
Bjorn Terelius | ff8cce3 | 2019-04-11 18:34:01 +0200 | [diff] [blame] | 94 | |
Mirko Bonadei | 4b091f4 | 2019-07-16 11:55:08 +0200 | [diff] [blame] | 95 | ABSL_FLAG(bool, |
| 96 | protobuf_output, |
| 97 | false, |
| 98 | "Output charts as protobuf instead of python code."); |
Bjorn Terelius | ef73f59 | 2018-09-10 20:11:49 +0200 | [diff] [blame] | 99 | |
Mirko Bonadei | f2d97b8 | 2019-07-24 15:29:47 +0200 | [diff] [blame] | 100 | ABSL_FLAG(bool, |
| 101 | list_plots, |
| 102 | false, |
| 103 | "List of registered plots (for use with the --plot flag)"); |
| 104 | |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 105 | using webrtc::Plot; |
| 106 | |
| 107 | namespace { |
| 108 | std::vector<std::string> StrSplit(const std::string& s, |
| 109 | const std::string& delimiter) { |
| 110 | std::vector<std::string> v; |
| 111 | size_t pos = 0; |
| 112 | while (pos < s.length()) { |
| 113 | const std::string token = s.substr(pos, s.find(delimiter, pos) - pos); |
| 114 | pos += token.length() + delimiter.length(); |
| 115 | v.push_back(token); |
| 116 | } |
| 117 | return v; |
| 118 | } |
| 119 | |
| 120 | struct PlotDeclaration { |
| 121 | PlotDeclaration(const std::string& label, std::function<void(Plot*)> f) |
| 122 | : label(label), enabled(false), plot_func(f) {} |
| 123 | const std::string label; |
| 124 | bool enabled; |
| 125 | // TODO(terelius): Add a help text/explanation. |
| 126 | const std::function<void(Plot*)> plot_func; |
| 127 | }; |
| 128 | |
| 129 | class PlotMap { |
| 130 | public: |
| 131 | void RegisterPlot(const std::string& label, std::function<void(Plot*)> f) { |
| 132 | for (const auto& plot : plots_) { |
| 133 | RTC_DCHECK(plot.label != label) |
| 134 | << "Can't use the same label for multiple plots"; |
| 135 | } |
| 136 | plots_.push_back({label, f}); |
| 137 | } |
| 138 | |
| 139 | bool EnablePlotsByFlags( |
| 140 | const std::vector<std::string>& flags, |
| 141 | const std::map<std::string, std::vector<std::string>>& flag_aliases) { |
| 142 | bool status = true; |
| 143 | for (const std::string& flag : flags) { |
| 144 | auto alias_it = flag_aliases.find(flag); |
| 145 | if (alias_it != flag_aliases.end()) { |
| 146 | const auto& replacements = alias_it->second; |
| 147 | for (const auto& replacement : replacements) { |
| 148 | status &= EnablePlotByFlag(replacement); |
| 149 | } |
| 150 | } else { |
| 151 | status &= EnablePlotByFlag(flag); |
| 152 | } |
| 153 | } |
| 154 | return status; |
| 155 | } |
| 156 | |
| 157 | void EnableAllPlots() { |
| 158 | for (auto& plot : plots_) { |
| 159 | plot.enabled = true; |
| 160 | } |
| 161 | } |
| 162 | |
| 163 | std::vector<PlotDeclaration>::iterator begin() { return plots_.begin(); } |
| 164 | std::vector<PlotDeclaration>::iterator end() { return plots_.end(); } |
| 165 | |
| 166 | private: |
| 167 | bool EnablePlotByFlag(const std::string& flag) { |
| 168 | for (auto& plot : plots_) { |
| 169 | if (plot.label == flag) { |
| 170 | plot.enabled = true; |
| 171 | return true; |
| 172 | } |
| 173 | } |
| 174 | if (flag == "simulated_neteq_jitter_buffer_delay") { |
| 175 | // This flag is handled separately. |
| 176 | return true; |
| 177 | } |
| 178 | std::cerr << "Unrecognized plot name \'" << flag << "\'. Aborting." |
| 179 | << std::endl; |
| 180 | return false; |
| 181 | } |
| 182 | |
| 183 | std::vector<PlotDeclaration> plots_; |
| 184 | }; |
Mirko Bonadei | f2d97b8 | 2019-07-24 15:29:47 +0200 | [diff] [blame] | 185 | |
| 186 | bool ContainsHelppackageFlags(absl::string_view filename) { |
| 187 | return absl::EndsWith(filename, "main.cc"); |
| 188 | } |
| 189 | |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 190 | } // namespace |
terelius | 2ee076d | 2017-08-15 02:04:02 -0700 | [diff] [blame] | 191 | |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 192 | int main(int argc, char* argv[]) { |
Mirko Bonadei | f2d97b8 | 2019-07-24 15:29:47 +0200 | [diff] [blame] | 193 | absl::SetProgramUsageMessage( |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 194 | "A tool for visualizing WebRTC event logs.\n" |
Mirko Bonadei | f2d97b8 | 2019-07-24 15:29:47 +0200 | [diff] [blame] | 195 | "Example usage:\n" |
| 196 | "./event_log_visualizer <logfile> | python\n"); |
| 197 | absl::FlagsUsageConfig config; |
| 198 | config.contains_help_flags = &ContainsHelppackageFlags; |
| 199 | absl::SetFlagsUsageConfig(config); |
Mirko Bonadei | 4b091f4 | 2019-07-16 11:55:08 +0200 | [diff] [blame] | 200 | std::vector<char*> args = absl::ParseCommandLine(argc, argv); |
| 201 | |
Björn Terelius | a06048a | 2019-11-01 14:31:46 +0100 | [diff] [blame] | 202 | // Print RTC_LOG warnings and errors even in release builds. |
| 203 | if (rtc::LogMessage::GetLogToDebug() > rtc::LS_WARNING) { |
| 204 | rtc::LogMessage::LogToDebug(rtc::LS_WARNING); |
| 205 | } |
| 206 | rtc::LogMessage::SetLogToStderr(true); |
| 207 | |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 208 | // Flag replacements |
| 209 | std::map<std::string, std::vector<std::string>> flag_aliases = { |
| 210 | {"default", |
| 211 | {"incoming_delay", "incoming_loss_rate", "incoming_bitrate", |
Bjorn Terelius | 873a7a9 | 2019-06-13 16:01:17 +0200 | [diff] [blame] | 212 | "outgoing_bitrate", "incoming_stream_bitrate", |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 213 | "outgoing_stream_bitrate", "network_delay_feedback", |
| 214 | "fraction_loss_feedback"}}, |
| 215 | {"sendside_bwe", |
| 216 | {"outgoing_packet_sizes", "outgoing_bitrate", "outgoing_stream_bitrate", |
| 217 | "simulated_sendside_bwe", "network_delay_feedback", |
| 218 | "fraction_loss_feedback"}}, |
| 219 | {"receiveside_bwe", |
| 220 | {"incoming_packet_sizes", "incoming_delay", "incoming_loss_rate", |
Bjorn Terelius | 873a7a9 | 2019-06-13 16:01:17 +0200 | [diff] [blame] | 221 | "incoming_bitrate", "incoming_stream_bitrate", |
| 222 | "simulated_receiveside_bwe"}}, |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 223 | {"rtcp_details", |
| 224 | {"incoming_rtcp_fraction_lost", "outgoing_rtcp_fraction_lost", |
Bjorn Terelius | 873a7a9 | 2019-06-13 16:01:17 +0200 | [diff] [blame] | 225 | "incoming_rtcp_cumulative_lost", "outgoing_rtcp_cumulative_lost", |
| 226 | "incoming_rtcp_highest_seq_number", "outgoing_rtcp_highest_seq_number", |
| 227 | "incoming_rtcp_delay_since_last_sr", |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 228 | "outgoing_rtcp_delay_since_last_sr"}}, |
| 229 | {"simulated_neteq_stats", |
| 230 | {"simulated_neteq_jitter_buffer_delay", |
Bjorn Terelius | 873a7a9 | 2019-06-13 16:01:17 +0200 | [diff] [blame] | 231 | "simulated_neteq_preferred_buffer_size", |
| 232 | "simulated_neteq_concealment_events", |
| 233 | "simulated_neteq_packet_loss_rate", "simulated_neteq_preemptive_rate", |
| 234 | "simulated_neteq_accelerate_rate", "simulated_neteq_speech_expand_rate", |
| 235 | "simulated_neteq_expand_rate"}}}; |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 236 | |
Mirko Bonadei | 4b091f4 | 2019-07-16 11:55:08 +0200 | [diff] [blame] | 237 | std::vector<std::string> plot_flags = |
| 238 | StrSplit(absl::GetFlag(FLAGS_plot), ","); |
kjellander | 4fa5be4 | 2017-05-16 00:01:23 -0700 | [diff] [blame] | 239 | |
Bjorn Terelius | edab301 | 2018-01-31 17:23:40 +0100 | [diff] [blame] | 240 | // InitFieldTrialsFromString stores the char*, so the char array must outlive |
| 241 | // the application. |
Mirko Bonadei | 4b091f4 | 2019-07-16 11:55:08 +0200 | [diff] [blame] | 242 | const std::string field_trials = absl::GetFlag(FLAGS_force_fieldtrials); |
| 243 | webrtc::field_trial::InitFieldTrialsFromString(field_trials.c_str()); |
stefan | 985d280 | 2016-11-15 06:54:09 -0800 | [diff] [blame] | 244 | |
Sebastian Jansson | b290a6d | 2019-01-03 14:46:23 +0100 | [diff] [blame] | 245 | webrtc::ParsedRtcEventLog::UnconfiguredHeaderExtensions header_extensions = |
| 246 | webrtc::ParsedRtcEventLog::UnconfiguredHeaderExtensions::kDontParse; |
Mirko Bonadei | 4b091f4 | 2019-07-16 11:55:08 +0200 | [diff] [blame] | 247 | if (absl::GetFlag(FLAGS_parse_unconfigured_header_extensions)) { |
Sebastian Jansson | b290a6d | 2019-01-03 14:46:23 +0100 | [diff] [blame] | 248 | header_extensions = webrtc::ParsedRtcEventLog:: |
Bjorn Terelius | c4ca1d3 | 2018-04-27 14:33:34 +0200 | [diff] [blame] | 249 | UnconfiguredHeaderExtensions::kAttemptWebrtcDefaultConfig; |
| 250 | } |
Björn Terelius | a06048a | 2019-11-01 14:31:46 +0100 | [diff] [blame] | 251 | webrtc::ParsedRtcEventLog parsed_log(header_extensions, |
| 252 | /*allow_incomplete_logs*/ true); |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 253 | |
Mirko Bonadei | 4b091f4 | 2019-07-16 11:55:08 +0200 | [diff] [blame] | 254 | if (args.size() == 2) { |
| 255 | std::string filename = args[1]; |
Björn Terelius | a06048a | 2019-11-01 14:31:46 +0100 | [diff] [blame] | 256 | auto status = parsed_log.ParseFile(filename); |
| 257 | if (!status.ok()) { |
| 258 | std::cerr << "Failed to parse " << filename << ": " << status.message() |
| 259 | << std::endl; |
| 260 | return -1; |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 261 | } |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 262 | } |
| 263 | |
Mirko Bonadei | 4b091f4 | 2019-07-16 11:55:08 +0200 | [diff] [blame] | 264 | webrtc::EventLogAnalyzer analyzer(parsed_log, |
| 265 | absl::GetFlag(FLAGS_normalize_time)); |
Bjorn Terelius | ef73f59 | 2018-09-10 20:11:49 +0200 | [diff] [blame] | 266 | std::unique_ptr<webrtc::PlotCollection> collection; |
Mirko Bonadei | 4b091f4 | 2019-07-16 11:55:08 +0200 | [diff] [blame] | 267 | if (absl::GetFlag(FLAGS_protobuf_output)) { |
Bjorn Terelius | ef73f59 | 2018-09-10 20:11:49 +0200 | [diff] [blame] | 268 | collection.reset(new webrtc::ProtobufPlotCollection()); |
| 269 | } else { |
Mirko Bonadei | 4b091f4 | 2019-07-16 11:55:08 +0200 | [diff] [blame] | 270 | collection.reset( |
| 271 | new webrtc::PythonPlotCollection(absl::GetFlag(FLAGS_shared_xaxis))); |
Bjorn Terelius | ef73f59 | 2018-09-10 20:11:49 +0200 | [diff] [blame] | 272 | } |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 273 | |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 274 | PlotMap plots; |
| 275 | plots.RegisterPlot("incoming_packet_sizes", [&](Plot* plot) { |
| 276 | analyzer.CreatePacketGraph(webrtc::kIncomingPacket, plot); |
| 277 | }); |
| 278 | |
| 279 | plots.RegisterPlot("outgoing_packet_sizes", [&](Plot* plot) { |
| 280 | analyzer.CreatePacketGraph(webrtc::kOutgoingPacket, plot); |
| 281 | }); |
| 282 | plots.RegisterPlot("incoming_rtcp_types", [&](Plot* plot) { |
| 283 | analyzer.CreateRtcpTypeGraph(webrtc::kIncomingPacket, plot); |
| 284 | }); |
| 285 | plots.RegisterPlot("outgoing_rtcp_types", [&](Plot* plot) { |
| 286 | analyzer.CreateRtcpTypeGraph(webrtc::kOutgoingPacket, plot); |
| 287 | }); |
| 288 | plots.RegisterPlot("incoming_packet_count", [&](Plot* plot) { |
| 289 | analyzer.CreateAccumulatedPacketsGraph(webrtc::kIncomingPacket, plot); |
| 290 | }); |
| 291 | plots.RegisterPlot("outgoing_packet_count", [&](Plot* plot) { |
| 292 | analyzer.CreateAccumulatedPacketsGraph(webrtc::kOutgoingPacket, plot); |
| 293 | }); |
Kristoffer Erlandsson | 283c106 | 2020-03-30 13:01:37 +0200 | [diff] [blame] | 294 | plots.RegisterPlot("incoming_packet_rate", [&](Plot* plot) { |
| 295 | analyzer.CreatePacketRateGraph(webrtc::kIncomingPacket, plot); |
| 296 | }); |
| 297 | plots.RegisterPlot("outgoing_packet_rate", [&](Plot* plot) { |
| 298 | analyzer.CreatePacketRateGraph(webrtc::kOutgoingPacket, plot); |
| 299 | }); |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 300 | plots.RegisterPlot("audio_playout", |
| 301 | [&](Plot* plot) { analyzer.CreatePlayoutGraph(plot); }); |
| 302 | plots.RegisterPlot("incoming_audio_level", [&](Plot* plot) { |
| 303 | analyzer.CreateAudioLevelGraph(webrtc::kIncomingPacket, plot); |
| 304 | }); |
| 305 | plots.RegisterPlot("outgoing_audio_level", [&](Plot* plot) { |
| 306 | analyzer.CreateAudioLevelGraph(webrtc::kOutgoingPacket, plot); |
| 307 | }); |
| 308 | plots.RegisterPlot("incoming_sequence_number_delta", [&](Plot* plot) { |
| 309 | analyzer.CreateSequenceNumberGraph(plot); |
| 310 | }); |
| 311 | plots.RegisterPlot("incoming_delay", [&](Plot* plot) { |
| 312 | analyzer.CreateIncomingDelayGraph(plot); |
| 313 | }); |
| 314 | plots.RegisterPlot("incoming_loss_rate", [&](Plot* plot) { |
| 315 | analyzer.CreateIncomingPacketLossGraph(plot); |
| 316 | }); |
| 317 | plots.RegisterPlot("incoming_bitrate", [&](Plot* plot) { |
| 318 | analyzer.CreateTotalIncomingBitrateGraph(plot); |
| 319 | }); |
| 320 | plots.RegisterPlot("outgoing_bitrate", [&](Plot* plot) { |
Mirko Bonadei | 4b091f4 | 2019-07-16 11:55:08 +0200 | [diff] [blame] | 321 | analyzer.CreateTotalOutgoingBitrateGraph( |
| 322 | plot, absl::GetFlag(FLAGS_show_detector_state), |
| 323 | absl::GetFlag(FLAGS_show_alr_state)); |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 324 | }); |
| 325 | plots.RegisterPlot("incoming_stream_bitrate", [&](Plot* plot) { |
| 326 | analyzer.CreateStreamBitrateGraph(webrtc::kIncomingPacket, plot); |
| 327 | }); |
| 328 | plots.RegisterPlot("outgoing_stream_bitrate", [&](Plot* plot) { |
| 329 | analyzer.CreateStreamBitrateGraph(webrtc::kOutgoingPacket, plot); |
| 330 | }); |
| 331 | plots.RegisterPlot("incoming_layer_bitrate_allocation", [&](Plot* plot) { |
| 332 | analyzer.CreateBitrateAllocationGraph(webrtc::kIncomingPacket, plot); |
| 333 | }); |
| 334 | plots.RegisterPlot("outgoing_layer_bitrate_allocation", [&](Plot* plot) { |
| 335 | analyzer.CreateBitrateAllocationGraph(webrtc::kOutgoingPacket, plot); |
| 336 | }); |
| 337 | plots.RegisterPlot("simulated_receiveside_bwe", [&](Plot* plot) { |
| 338 | analyzer.CreateReceiveSideBweSimulationGraph(plot); |
| 339 | }); |
| 340 | plots.RegisterPlot("simulated_sendside_bwe", [&](Plot* plot) { |
| 341 | analyzer.CreateSendSideBweSimulationGraph(plot); |
| 342 | }); |
| 343 | plots.RegisterPlot("simulated_goog_cc", [&](Plot* plot) { |
| 344 | analyzer.CreateGoogCcSimulationGraph(plot); |
| 345 | }); |
| 346 | plots.RegisterPlot("network_delay_feedback", [&](Plot* plot) { |
| 347 | analyzer.CreateNetworkDelayFeedbackGraph(plot); |
| 348 | }); |
| 349 | plots.RegisterPlot("fraction_loss_feedback", [&](Plot* plot) { |
| 350 | analyzer.CreateFractionLossGraph(plot); |
| 351 | }); |
| 352 | plots.RegisterPlot("incoming_timestamps", [&](Plot* plot) { |
| 353 | analyzer.CreateTimestampGraph(webrtc::kIncomingPacket, plot); |
| 354 | }); |
| 355 | plots.RegisterPlot("outgoing_timestamps", [&](Plot* plot) { |
| 356 | analyzer.CreateTimestampGraph(webrtc::kOutgoingPacket, plot); |
| 357 | }); |
| 358 | |
| 359 | auto GetFractionLost = [](const webrtc::rtcp::ReportBlock& block) -> float { |
| 360 | return static_cast<double>(block.fraction_lost()) / 256 * 100; |
| 361 | }; |
| 362 | plots.RegisterPlot("incoming_rtcp_fraction_lost", [&](Plot* plot) { |
Bjorn Terelius | b1222c2 | 2018-07-24 13:45:31 +0200 | [diff] [blame] | 363 | analyzer.CreateSenderAndReceiverReportPlot( |
| 364 | webrtc::kIncomingPacket, GetFractionLost, |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 365 | "Fraction lost (incoming RTCP)", "Loss rate (percent)", plot); |
| 366 | }); |
| 367 | plots.RegisterPlot("outgoing_rtcp_fraction_lost", [&](Plot* plot) { |
Bjorn Terelius | b1222c2 | 2018-07-24 13:45:31 +0200 | [diff] [blame] | 368 | analyzer.CreateSenderAndReceiverReportPlot( |
| 369 | webrtc::kOutgoingPacket, GetFractionLost, |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 370 | "Fraction lost (outgoing RTCP)", "Loss rate (percent)", plot); |
| 371 | }); |
| 372 | auto GetCumulativeLost = [](const webrtc::rtcp::ReportBlock& block) -> float { |
| 373 | return block.cumulative_lost_signed(); |
| 374 | }; |
| 375 | plots.RegisterPlot("incoming_rtcp_cumulative_lost", [&](Plot* plot) { |
Bjorn Terelius | b1222c2 | 2018-07-24 13:45:31 +0200 | [diff] [blame] | 376 | analyzer.CreateSenderAndReceiverReportPlot( |
| 377 | webrtc::kIncomingPacket, GetCumulativeLost, |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 378 | "Cumulative lost packets (incoming RTCP)", "Packets", plot); |
| 379 | }); |
| 380 | plots.RegisterPlot("outgoing_rtcp_cumulative_lost", [&](Plot* plot) { |
Bjorn Terelius | b1222c2 | 2018-07-24 13:45:31 +0200 | [diff] [blame] | 381 | analyzer.CreateSenderAndReceiverReportPlot( |
| 382 | webrtc::kOutgoingPacket, GetCumulativeLost, |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 383 | "Cumulative lost packets (outgoing RTCP)", "Packets", plot); |
| 384 | }); |
Bjorn Terelius | b1222c2 | 2018-07-24 13:45:31 +0200 | [diff] [blame] | 385 | |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 386 | auto GetHighestSeqNumber = |
| 387 | [](const webrtc::rtcp::ReportBlock& block) -> float { |
| 388 | return block.extended_high_seq_num(); |
| 389 | }; |
| 390 | plots.RegisterPlot("incoming_rtcp_highest_seq_number", [&](Plot* plot) { |
Bjorn Terelius | b1222c2 | 2018-07-24 13:45:31 +0200 | [diff] [blame] | 391 | analyzer.CreateSenderAndReceiverReportPlot( |
| 392 | webrtc::kIncomingPacket, GetHighestSeqNumber, |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 393 | "Highest sequence number (incoming RTCP)", "Sequence number", plot); |
| 394 | }); |
| 395 | plots.RegisterPlot("outgoing_rtcp_highest_seq_number", [&](Plot* plot) { |
Bjorn Terelius | b1222c2 | 2018-07-24 13:45:31 +0200 | [diff] [blame] | 396 | analyzer.CreateSenderAndReceiverReportPlot( |
| 397 | webrtc::kOutgoingPacket, GetHighestSeqNumber, |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 398 | "Highest sequence number (outgoing RTCP)", "Sequence number", plot); |
| 399 | }); |
Bjorn Terelius | b1222c2 | 2018-07-24 13:45:31 +0200 | [diff] [blame] | 400 | |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 401 | auto DelaySinceLastSr = [](const webrtc::rtcp::ReportBlock& block) -> float { |
| 402 | return static_cast<double>(block.delay_since_last_sr()) / 65536; |
| 403 | }; |
| 404 | plots.RegisterPlot("incoming_rtcp_delay_since_last_sr", [&](Plot* plot) { |
Bjorn Terelius | b1222c2 | 2018-07-24 13:45:31 +0200 | [diff] [blame] | 405 | analyzer.CreateSenderAndReceiverReportPlot( |
| 406 | webrtc::kIncomingPacket, DelaySinceLastSr, |
| 407 | "Delay since last received sender report (incoming RTCP)", "Time (s)", |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 408 | plot); |
| 409 | }); |
| 410 | plots.RegisterPlot("outgoing_rtcp_delay_since_last_sr", [&](Plot* plot) { |
Bjorn Terelius | b1222c2 | 2018-07-24 13:45:31 +0200 | [diff] [blame] | 411 | analyzer.CreateSenderAndReceiverReportPlot( |
| 412 | webrtc::kOutgoingPacket, DelaySinceLastSr, |
| 413 | "Delay since last received sender report (outgoing RTCP)", "Time (s)", |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 414 | plot); |
| 415 | }); |
Bjorn Terelius | b1222c2 | 2018-07-24 13:45:31 +0200 | [diff] [blame] | 416 | |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 417 | plots.RegisterPlot("pacer_delay", |
| 418 | [&](Plot* plot) { analyzer.CreatePacerDelayGraph(plot); }); |
| 419 | plots.RegisterPlot("audio_encoder_bitrate", [&](Plot* plot) { |
| 420 | analyzer.CreateAudioEncoderTargetBitrateGraph(plot); |
| 421 | }); |
| 422 | plots.RegisterPlot("audio_encoder_frame_length", [&](Plot* plot) { |
| 423 | analyzer.CreateAudioEncoderFrameLengthGraph(plot); |
| 424 | }); |
| 425 | plots.RegisterPlot("audio_encoder_packet_loss", [&](Plot* plot) { |
| 426 | analyzer.CreateAudioEncoderPacketLossGraph(plot); |
| 427 | }); |
| 428 | plots.RegisterPlot("audio_encoder_fec", [&](Plot* plot) { |
| 429 | analyzer.CreateAudioEncoderEnableFecGraph(plot); |
| 430 | }); |
| 431 | plots.RegisterPlot("audio_encoder_dtx", [&](Plot* plot) { |
| 432 | analyzer.CreateAudioEncoderEnableDtxGraph(plot); |
| 433 | }); |
| 434 | plots.RegisterPlot("audio_encoder_num_channels", [&](Plot* plot) { |
| 435 | analyzer.CreateAudioEncoderNumChannelsGraph(plot); |
| 436 | }); |
| 437 | |
| 438 | plots.RegisterPlot("ice_candidate_pair_config", [&](Plot* plot) { |
| 439 | analyzer.CreateIceCandidatePairConfigGraph(plot); |
| 440 | }); |
| 441 | plots.RegisterPlot("ice_connectivity_check", [&](Plot* plot) { |
| 442 | analyzer.CreateIceConnectivityCheckGraph(plot); |
| 443 | }); |
| 444 | plots.RegisterPlot("dtls_transport_state", [&](Plot* plot) { |
| 445 | analyzer.CreateDtlsTransportStateGraph(plot); |
| 446 | }); |
| 447 | plots.RegisterPlot("dtls_writable_state", [&](Plot* plot) { |
| 448 | analyzer.CreateDtlsWritableStateGraph(plot); |
| 449 | }); |
| 450 | |
| 451 | std::string wav_path; |
Mirko Bonadei | 4b091f4 | 2019-07-16 11:55:08 +0200 | [diff] [blame] | 452 | if (!absl::GetFlag(FLAGS_wav_filename).empty()) { |
| 453 | wav_path = absl::GetFlag(FLAGS_wav_filename); |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 454 | } else { |
| 455 | wav_path = webrtc::test::ResourcePath( |
| 456 | "audio_processing/conversational_speech/EN_script2_F_sp2_B1", "wav"); |
Bjorn Terelius | 0295a96 | 2017-10-25 17:42:41 +0200 | [diff] [blame] | 457 | } |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 458 | absl::optional<webrtc::EventLogAnalyzer::NetEqStatsGetterMap> neteq_stats; |
| 459 | |
| 460 | plots.RegisterPlot("simulated_neteq_expand_rate", [&](Plot* plot) { |
| 461 | if (!neteq_stats) { |
| 462 | neteq_stats = analyzer.SimulateNetEq(wav_path, 48000); |
Minyue Li | 45fc6df | 2018-06-21 11:47:14 +0200 | [diff] [blame] | 463 | } |
Minyue Li | c9ac93f | 2018-06-26 13:01:32 +0200 | [diff] [blame] | 464 | analyzer.CreateNetEqNetworkStatsGraph( |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 465 | *neteq_stats, |
Minyue Li | 27e2b7d | 2018-05-07 15:20:24 +0200 | [diff] [blame] | 466 | [](const webrtc::NetEqNetworkStatistics& stats) { |
| 467 | return stats.expand_rate / 16384.f; |
| 468 | }, |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 469 | "Expand rate", plot); |
| 470 | }); |
| 471 | |
| 472 | plots.RegisterPlot("simulated_neteq_speech_expand_rate", [&](Plot* plot) { |
| 473 | if (!neteq_stats) { |
| 474 | neteq_stats = analyzer.SimulateNetEq(wav_path, 48000); |
| 475 | } |
Minyue Li | c9ac93f | 2018-06-26 13:01:32 +0200 | [diff] [blame] | 476 | analyzer.CreateNetEqNetworkStatsGraph( |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 477 | *neteq_stats, |
Minyue Li | 27e2b7d | 2018-05-07 15:20:24 +0200 | [diff] [blame] | 478 | [](const webrtc::NetEqNetworkStatistics& stats) { |
| 479 | return stats.speech_expand_rate / 16384.f; |
| 480 | }, |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 481 | "Speech expand rate", plot); |
| 482 | }); |
| 483 | |
| 484 | plots.RegisterPlot("simulated_neteq_accelerate_rate", [&](Plot* plot) { |
| 485 | if (!neteq_stats) { |
| 486 | neteq_stats = analyzer.SimulateNetEq(wav_path, 48000); |
| 487 | } |
Minyue Li | c9ac93f | 2018-06-26 13:01:32 +0200 | [diff] [blame] | 488 | analyzer.CreateNetEqNetworkStatsGraph( |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 489 | *neteq_stats, |
Minyue Li | 27e2b7d | 2018-05-07 15:20:24 +0200 | [diff] [blame] | 490 | [](const webrtc::NetEqNetworkStatistics& stats) { |
| 491 | return stats.accelerate_rate / 16384.f; |
| 492 | }, |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 493 | "Accelerate rate", plot); |
| 494 | }); |
| 495 | |
| 496 | plots.RegisterPlot("simulated_neteq_preemptive_rate", [&](Plot* plot) { |
| 497 | if (!neteq_stats) { |
| 498 | neteq_stats = analyzer.SimulateNetEq(wav_path, 48000); |
| 499 | } |
Minyue Li | c9ac93f | 2018-06-26 13:01:32 +0200 | [diff] [blame] | 500 | analyzer.CreateNetEqNetworkStatsGraph( |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 501 | *neteq_stats, |
Minyue Li | 27e2b7d | 2018-05-07 15:20:24 +0200 | [diff] [blame] | 502 | [](const webrtc::NetEqNetworkStatistics& stats) { |
Jakob Ivarsson | 21f6fd7 | 2019-04-04 10:15:02 +0200 | [diff] [blame] | 503 | return stats.preemptive_rate / 16384.f; |
| 504 | }, |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 505 | "Preemptive rate", plot); |
| 506 | }); |
| 507 | |
| 508 | plots.RegisterPlot("simulated_neteq_packet_loss_rate", [&](Plot* plot) { |
| 509 | if (!neteq_stats) { |
| 510 | neteq_stats = analyzer.SimulateNetEq(wav_path, 48000); |
| 511 | } |
Jakob Ivarsson | 21f6fd7 | 2019-04-04 10:15:02 +0200 | [diff] [blame] | 512 | analyzer.CreateNetEqNetworkStatsGraph( |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 513 | *neteq_stats, |
Jakob Ivarsson | 21f6fd7 | 2019-04-04 10:15:02 +0200 | [diff] [blame] | 514 | [](const webrtc::NetEqNetworkStatistics& stats) { |
Minyue Li | 27e2b7d | 2018-05-07 15:20:24 +0200 | [diff] [blame] | 515 | return stats.packet_loss_rate / 16384.f; |
| 516 | }, |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 517 | "Packet loss rate", plot); |
| 518 | }); |
| 519 | |
| 520 | plots.RegisterPlot("simulated_neteq_concealment_events", [&](Plot* plot) { |
| 521 | if (!neteq_stats) { |
| 522 | neteq_stats = analyzer.SimulateNetEq(wav_path, 48000); |
| 523 | } |
Minyue Li | c9ac93f | 2018-06-26 13:01:32 +0200 | [diff] [blame] | 524 | analyzer.CreateNetEqLifetimeStatsGraph( |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 525 | *neteq_stats, |
Minyue Li | c9ac93f | 2018-06-26 13:01:32 +0200 | [diff] [blame] | 526 | [](const webrtc::NetEqLifetimeStatistics& stats) { |
| 527 | return static_cast<float>(stats.concealment_events); |
| 528 | }, |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 529 | "Concealment events", plot); |
| 530 | }); |
| 531 | |
| 532 | plots.RegisterPlot("simulated_neteq_preferred_buffer_size", [&](Plot* plot) { |
| 533 | if (!neteq_stats) { |
| 534 | neteq_stats = analyzer.SimulateNetEq(wav_path, 48000); |
| 535 | } |
Jakob Ivarsson | 21f6fd7 | 2019-04-04 10:15:02 +0200 | [diff] [blame] | 536 | analyzer.CreateNetEqNetworkStatsGraph( |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 537 | *neteq_stats, |
Jakob Ivarsson | 21f6fd7 | 2019-04-04 10:15:02 +0200 | [diff] [blame] | 538 | [](const webrtc::NetEqNetworkStatistics& stats) { |
| 539 | return stats.preferred_buffer_size_ms; |
| 540 | }, |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 541 | "Preferred buffer size (ms)", plot); |
| 542 | }); |
| 543 | |
| 544 | if (absl::c_find(plot_flags, "all") != plot_flags.end()) { |
| 545 | plots.EnableAllPlots(); |
| 546 | // Treated separately since it isn't registered like the other plots. |
| 547 | plot_flags.push_back("simulated_neteq_jitter_buffer_delay"); |
| 548 | } else { |
| 549 | bool success = plots.EnablePlotsByFlags(plot_flags, flag_aliases); |
| 550 | if (!success) { |
| 551 | return 1; |
| 552 | } |
henrik.lundin | 3c938fc | 2017-06-14 06:09:58 -0700 | [diff] [blame] | 553 | } |
| 554 | |
Mirko Bonadei | f2d97b8 | 2019-07-24 15:29:47 +0200 | [diff] [blame] | 555 | if (absl::GetFlag(FLAGS_list_plots)) { |
| 556 | std::cerr << "List of registered plots (for use with the --plot flag):" |
| 557 | << std::endl; |
| 558 | for (const auto& plot : plots) { |
| 559 | // TODO(terelius): Also print a help text. |
| 560 | std::cerr << " " << plot.label << std::endl; |
| 561 | } |
| 562 | // The following flag doesn't fit the model used for the other plots. |
| 563 | std::cerr << "simulated_neteq_jitter_buffer_delay" << std::endl; |
| 564 | std::cerr << "List of plot aliases (for use with the --plot flag):" |
| 565 | << std::endl; |
| 566 | std::cerr << " all = every registered plot" << std::endl; |
| 567 | for (const auto& alias : flag_aliases) { |
| 568 | std::cerr << " " << alias.first << " = "; |
| 569 | for (const auto& replacement : alias.second) { |
| 570 | std::cerr << replacement << ","; |
| 571 | } |
| 572 | std::cerr << std::endl; |
| 573 | } |
| 574 | return 0; |
| 575 | } |
| 576 | if (args.size() != 2) { |
| 577 | // Print usage information. |
| 578 | std::cerr << absl::ProgramUsageMessage(); |
| 579 | return 1; |
| 580 | } |
Qingsi Wang | 8eca1ff | 2018-02-02 11:49:44 -0800 | [diff] [blame] | 581 | |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 582 | for (const auto& plot : plots) { |
| 583 | if (plot.enabled) { |
| 584 | Plot* output = collection->AppendNewPlot(); |
| 585 | plot.plot_func(output); |
| 586 | output->SetId(plot.label); |
| 587 | } |
Zach Stein | 10a5801 | 2018-12-07 12:26:28 -0800 | [diff] [blame] | 588 | } |
Bjorn Terelius | 1aa9ee9 | 2019-06-11 17:39:38 +0200 | [diff] [blame] | 589 | |
| 590 | // The model we use for registering plots assumes that the each plot label |
| 591 | // can be mapped to a lambda that will produce exactly one plot. The |
| 592 | // simulated_neteq_jitter_buffer_delay plot doesn't fit this model since it |
| 593 | // creates multiple plots, and would need some state kept between the lambda |
| 594 | // calls. |
| 595 | if (absl::c_find(plot_flags, "simulated_neteq_jitter_buffer_delay") != |
| 596 | plot_flags.end()) { |
| 597 | if (!neteq_stats) { |
| 598 | neteq_stats = analyzer.SimulateNetEq(wav_path, 48000); |
| 599 | } |
| 600 | for (webrtc::EventLogAnalyzer::NetEqStatsGetterMap::const_iterator it = |
| 601 | neteq_stats->cbegin(); |
| 602 | it != neteq_stats->cend(); ++it) { |
| 603 | analyzer.CreateAudioJitterBufferGraph(it->first, it->second.get(), |
| 604 | collection->AppendNewPlot()); |
| 605 | } |
Zach Stein | 10a5801 | 2018-12-07 12:26:28 -0800 | [diff] [blame] | 606 | } |
| 607 | |
terelius | dc35dcd | 2016-08-01 12:03:27 -0700 | [diff] [blame] | 608 | collection->Draw(); |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 609 | |
Mirko Bonadei | 4b091f4 | 2019-07-16 11:55:08 +0200 | [diff] [blame] | 610 | if (absl::GetFlag(FLAGS_print_triage_alerts)) { |
Bjorn Terelius | 2eb3188 | 2017-11-30 15:15:25 +0100 | [diff] [blame] | 611 | analyzer.CreateTriageNotifications(); |
| 612 | analyzer.PrintNotifications(stderr); |
| 613 | } |
| 614 | |
terelius | 54ce680 | 2016-07-13 06:44:41 -0700 | [diff] [blame] | 615 | return 0; |
| 616 | } |