Revert "Refactor AnalyzerConfig to use Timestamps instead of microseconds."
This reverts commit 43fb16921b29ecd3a2d87876dda75c575e05f66a. Reason for revert: New type breaks downstream projects. Original change's description: > Refactor AnalyzerConfig to use Timestamps instead of microseconds. > > Add optional offset-to-UTC parameter to output. This allows aligning > the x-axis in the generated charts to other UTC-based logs. > > Bug: b/215140373 > Change-Id: I65bcd295718acbb8c94e363907c1abc458067bfd > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/250203 > Reviewed-by: Kristoffer Erlandsson <kerl@google.com> > Commit-Queue: Björn Terelius <terelius@webrtc.org> > Cr-Commit-Position: refs/heads/main@{#35992} TBR=terelius@webrtc.org,kerl@google.com,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com Change-Id: If4f2330b9731f26a0e55c9ce9a500322a111b783 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: b/215140373 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251691 Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com> Reviewed-by: Evan Shrubsole <eshr@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Christoffer Jansson <jansson@google.com> Cr-Commit-Position: refs/heads/main@{#35994}
This commit is contained in:

committed by
WebRTC LUCI CQ

parent
e7b4c137cc
commit
66bfd6f57d
@ -79,7 +79,7 @@ void TriageHelper::AnalyzeStreamGaps(const ParsedRtcEventLog& parsed_log,
|
||||
|
||||
int64_t seq_num = seq_num_unwrapper.Unwrap(packet.header.sequenceNumber);
|
||||
if (std::abs(seq_num - last_seq_num) > kMaxSeqNumJump) {
|
||||
Alert(seq_num_alert, config_.GetCallTimeSec(packet.log_time()),
|
||||
Alert(seq_num_alert, config_.GetCallTimeSec(packet.log_time_us()),
|
||||
seq_num_explanation);
|
||||
}
|
||||
last_seq_num = seq_num;
|
||||
@ -89,7 +89,7 @@ void TriageHelper::AnalyzeStreamGaps(const ParsedRtcEventLog& parsed_log,
|
||||
if (std::abs(capture_time - last_capture_time) >
|
||||
kTicksPerMillisec *
|
||||
(kCaptureTimeGraceMs + packet.log_time_ms() - last_log_time_ms)) {
|
||||
Alert(capture_time_alert, config_.GetCallTimeSec(packet.log_time()),
|
||||
Alert(capture_time_alert, config_.GetCallTimeSec(packet.log_time_us()),
|
||||
capture_time_explanation);
|
||||
}
|
||||
last_capture_time = capture_time;
|
||||
@ -140,8 +140,7 @@ void TriageHelper::AnalyzeTransmissionGaps(const ParsedRtcEventLog& parsed_log,
|
||||
int64_t duration = timestamp - last_rtp_time.value_or(0);
|
||||
if (last_rtp_time.has_value() && duration > kMaxRtpTransmissionGap) {
|
||||
// No packet sent/received for more than 500 ms.
|
||||
Alert(rtp_alert, config_.GetCallTimeSec(Timestamp::Micros(timestamp)),
|
||||
rtp_explanation);
|
||||
Alert(rtp_alert, config_.GetCallTimeSec(timestamp), rtp_explanation);
|
||||
}
|
||||
last_rtp_time.emplace(timestamp);
|
||||
}
|
||||
@ -156,7 +155,7 @@ void TriageHelper::AnalyzeTransmissionGaps(const ParsedRtcEventLog& parsed_log,
|
||||
int64_t duration = rtcp.log_time_us() - last_rtcp_time.value_or(0);
|
||||
if (last_rtcp_time.has_value() && duration > kMaxRtcpTransmissionGap) {
|
||||
// No feedback sent/received for more than 2000 ms.
|
||||
Alert(rtcp_alert, config_.GetCallTimeSec(rtcp.log_time()),
|
||||
Alert(rtcp_alert, config_.GetCallTimeSec(rtcp.log_time_us()),
|
||||
rtcp_explanation);
|
||||
}
|
||||
last_rtcp_time.emplace(rtcp.log_time_us());
|
||||
@ -170,7 +169,7 @@ void TriageHelper::AnalyzeTransmissionGaps(const ParsedRtcEventLog& parsed_log,
|
||||
int64_t duration = rtcp.log_time_us() - last_rtcp_time.value_or(0);
|
||||
if (last_rtcp_time.has_value() && duration > kMaxRtcpTransmissionGap) {
|
||||
// No feedback sent/received for more than 2000 ms.
|
||||
Alert(rtcp_alert, config_.GetCallTimeSec(rtcp.log_time()),
|
||||
Alert(rtcp_alert, config_.GetCallTimeSec(rtcp.log_time_us()),
|
||||
rtcp_explanation);
|
||||
}
|
||||
last_rtcp_time.emplace(rtcp.log_time_us());
|
||||
@ -190,7 +189,7 @@ void TriageHelper::AnalyzeLog(const ParsedRtcEventLog& parsed_log) {
|
||||
|
||||
const int64_t segment_end_us = parsed_log.first_log_segment().stop_time_us();
|
||||
|
||||
Timestamp first_occurrence = parsed_log.last_timestamp();
|
||||
int64_t first_occurrence = parsed_log.last_timestamp();
|
||||
constexpr double kMaxLossFraction = 0.05;
|
||||
// Loss feedback
|
||||
int64_t total_lost_packets = 0;
|
||||
@ -205,14 +204,13 @@ void TriageHelper::AnalyzeLog(const ParsedRtcEventLog& parsed_log) {
|
||||
total_lost_packets += lost_packets;
|
||||
total_expected_packets += bwe_update.expected_packets;
|
||||
if (bwe_update.fraction_lost >= 255 * kMaxLossFraction) {
|
||||
first_occurrence = std::min(first_occurrence, bwe_update.log_time());
|
||||
first_occurrence = std::min(first_occurrence, bwe_update.log_time_us());
|
||||
}
|
||||
}
|
||||
double avg_outgoing_loss =
|
||||
static_cast<double>(total_lost_packets) / total_expected_packets;
|
||||
if (avg_outgoing_loss > kMaxLossFraction) {
|
||||
Alert(TriageAlertType::kOutgoingHighLoss,
|
||||
config_.GetCallTimeSec(first_occurrence),
|
||||
Alert(TriageAlertType::kOutgoingHighLoss, first_occurrence,
|
||||
"More than 5% of outgoing packets lost.");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user