Aid triaging of bugs by printing notifications about interesting parts of an event log.

Notifications are printed for gaps in seq number, capture timestamp, arrival and send times for RTP and RTCP, and high average loss.
The notifications are printed to stderr by default, but internally they are represented as subclasses to a TriageNotification base class in order to facilitate other output formats.

Initially, this is only run if the event_log_visualizer is given the flag --print_triage_notifications.

Only the first (LOG_START, LOG_END) segment is processed.

Bug: webrtc:8383
Change-Id: If43ef7f115f622fa5552dc50951a11d5f9e3cbaa
Reviewed-on: https://webrtc-review.googlesource.com/8720
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20974}
This commit is contained in:
Bjorn Terelius
2017-11-30 15:15:25 +01:00
committed by Commit Bot
parent 8c319e951a
commit 2eb3188e3e
5 changed files with 341 additions and 2 deletions

View File

@ -24,6 +24,7 @@
#include "modules/rtp_rtcp/source/rtcp_packet.h"
#include "rtc_base/function_view.h"
#include "rtc_tools/event_log_visualizer/plot_base.h"
#include "rtc_tools/event_log_visualizer/triage_notifications.h"
namespace webrtc {
namespace plotting {
@ -111,6 +112,9 @@ class EventLogAnalyzer {
// of the stream with the most number of frames.
std::vector<std::pair<int64_t, int64_t>> GetFrameTimestamps() const;
void CreateTriageNotifications();
void PrintNotifications(FILE* file);
private:
class StreamId {
public:
@ -150,6 +154,10 @@ class EventLogAnalyzer {
rtc::Optional<uint32_t> EstimateRtpClockFrequency(
const std::vector<LoggedRtpPacket>& packets) const;
float ToCallTime(int64_t timestamp) const;
void Notification(std::unique_ptr<TriageNotification> notification);
const ParsedRtcEventLog& parsed_log_;
// A list of SSRCs we are interested in analysing.
@ -191,6 +199,8 @@ class EventLogAnalyzer {
std::vector<ParsedRtcEventLog::BweDelayBasedUpdate> bwe_delay_updates_;
std::vector<std::unique_ptr<TriageNotification>> notifications_;
// Window and step size used for calculating moving averages, e.g. bitrate.
// The generated data points will be |step_| microseconds apart.
// Only events occuring at most |window_duration_| microseconds before the