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
@ -1110,8 +1110,8 @@ void ParsedRtcEventLog::Clear() {
|
||||
|
||||
last_incoming_rtcp_packet_.clear();
|
||||
|
||||
first_timestamp_ = Timestamp::PlusInfinity();
|
||||
last_timestamp_ = Timestamp::MinusInfinity();
|
||||
first_timestamp_ = std::numeric_limits<int64_t>::max();
|
||||
last_timestamp_ = std::numeric_limits<int64_t>::min();
|
||||
first_log_segment_ = LogSegment(0, std::numeric_limits<int64_t>::max());
|
||||
|
||||
incoming_rtp_extensions_maps_.clear();
|
||||
@ -1232,8 +1232,8 @@ ParsedRtcEventLog::ParseStatus ParsedRtcEventLog::ParseStream(
|
||||
// stream configurations and starting/stopping the log.
|
||||
// TODO(terelius): Figure out if we actually need to find the first and last
|
||||
// timestamp in the parser. It seems like this could be done by the caller.
|
||||
first_timestamp_ = Timestamp::PlusInfinity();
|
||||
last_timestamp_ = Timestamp::MinusInfinity();
|
||||
first_timestamp_ = std::numeric_limits<int64_t>::max();
|
||||
last_timestamp_ = std::numeric_limits<int64_t>::min();
|
||||
StoreFirstAndLastTimestamp(alr_state_events());
|
||||
StoreFirstAndLastTimestamp(route_change_events());
|
||||
for (const auto& audio_stream : audio_playout_events()) {
|
||||
@ -1272,8 +1272,7 @@ ParsedRtcEventLog::ParseStatus ParsedRtcEventLog::ParseStream(
|
||||
// event, we could use the timestamp of the the last previous regular event.
|
||||
auto start_iter = start_log_events().begin();
|
||||
auto stop_iter = stop_log_events().begin();
|
||||
int64_t start_us =
|
||||
first_timestamp().us_or(std::numeric_limits<int64_t>::max());
|
||||
int64_t start_us = first_timestamp();
|
||||
int64_t next_start_us = std::numeric_limits<int64_t>::max();
|
||||
int64_t stop_us = std::numeric_limits<int64_t>::max();
|
||||
if (start_iter != start_log_events().end()) {
|
||||
@ -1287,14 +1286,15 @@ ParsedRtcEventLog::ParseStatus ParsedRtcEventLog::ParseStream(
|
||||
}
|
||||
stop_us = std::min(stop_us, next_start_us);
|
||||
if (stop_us == std::numeric_limits<int64_t>::max() &&
|
||||
!last_timestamp().IsMinusInfinity()) {
|
||||
stop_us = last_timestamp().us();
|
||||
last_timestamp() != std::numeric_limits<int64_t>::min()) {
|
||||
stop_us = last_timestamp();
|
||||
}
|
||||
RTC_PARSE_CHECK_OR_RETURN_LE(start_us, stop_us);
|
||||
first_log_segment_ = LogSegment(start_us, stop_us);
|
||||
|
||||
if (first_timestamp_ > last_timestamp_) {
|
||||
first_timestamp_ = last_timestamp_ = Timestamp::Zero();
|
||||
if (first_timestamp_ == std::numeric_limits<int64_t>::max() &&
|
||||
last_timestamp_ == std::numeric_limits<int64_t>::min()) {
|
||||
first_timestamp_ = last_timestamp_ = 0;
|
||||
}
|
||||
|
||||
return status;
|
||||
@ -1563,8 +1563,8 @@ template <typename T>
|
||||
void ParsedRtcEventLog::StoreFirstAndLastTimestamp(const std::vector<T>& v) {
|
||||
if (v.empty())
|
||||
return;
|
||||
first_timestamp_ = std::min(first_timestamp_, v.front().log_time());
|
||||
last_timestamp_ = std::max(last_timestamp_, v.back().log_time());
|
||||
first_timestamp_ = std::min(first_timestamp_, v.front().log_time_us());
|
||||
last_timestamp_ = std::max(last_timestamp_, v.back().log_time_us());
|
||||
}
|
||||
|
||||
ParsedRtcEventLog::ParseStatus ParsedRtcEventLog::StoreParsedLegacyEvent(
|
||||
|
||||
Reference in New Issue
Block a user