Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: webrtc/logging/rtc_event_log/rtc_event_log_parser.cc

Issue 2782553005: Visualize events related to probing in the total bitrate graph. (Closed)
Patch Set: GRAPH --> CHART Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 config->enable_dtx = rtc::Optional<bool>(ana_event.enable_dtx()); 527 config->enable_dtx = rtc::Optional<bool>(ana_event.enable_dtx());
528 if (ana_event.has_frame_length_ms()) 528 if (ana_event.has_frame_length_ms())
529 config->frame_length_ms = rtc::Optional<int>(ana_event.frame_length_ms()); 529 config->frame_length_ms = rtc::Optional<int>(ana_event.frame_length_ms());
530 if (ana_event.has_num_channels()) 530 if (ana_event.has_num_channels())
531 config->num_channels = rtc::Optional<size_t>(ana_event.num_channels()); 531 config->num_channels = rtc::Optional<size_t>(ana_event.num_channels());
532 if (ana_event.has_uplink_packet_loss_fraction()) 532 if (ana_event.has_uplink_packet_loss_fraction())
533 config->uplink_packet_loss_fraction = 533 config->uplink_packet_loss_fraction =
534 rtc::Optional<float>(ana_event.uplink_packet_loss_fraction()); 534 rtc::Optional<float>(ana_event.uplink_packet_loss_fraction());
535 } 535 }
536 536
537 ParsedRtcEventLog::BweProbeClusterCreatedEvent
538 ParsedRtcEventLog::GetBweProbeClusterCreated(size_t index) const {
539 RTC_CHECK_LT(index, GetNumberOfEvents());
540 const rtclog::Event& event = events_[index];
541 RTC_CHECK(event.has_type());
542 RTC_CHECK_EQ(event.type(), rtclog::Event::BWE_PROBE_CLUSTER_CREATED_EVENT);
543 RTC_CHECK(event.has_probe_cluster());
544 const rtclog::BweProbeCluster& pcc_event = event.probe_cluster();
545 BweProbeClusterCreatedEvent res;
546 res.timestamp = GetTimestamp(index);
547 RTC_CHECK(pcc_event.has_id());
548 res.id = pcc_event.id();
549 RTC_CHECK(pcc_event.has_bitrate_bps());
550 res.bitrate_bps = pcc_event.bitrate_bps();
551 RTC_CHECK(pcc_event.has_min_packets());
552 res.min_packets = pcc_event.min_packets();
553 RTC_CHECK(pcc_event.has_min_bytes());
554 res.min_bytes = pcc_event.min_bytes();
555 return res;
556 }
557
558 ParsedRtcEventLog::BweProbeResultEvent ParsedRtcEventLog::GetBweProbeResult(
559 size_t index) const {
560 RTC_CHECK_LT(index, GetNumberOfEvents());
561 const rtclog::Event& event = events_[index];
562 RTC_CHECK(event.has_type());
563 RTC_CHECK_EQ(event.type(), rtclog::Event::BWE_PROBE_RESULT_EVENT);
564 RTC_CHECK(event.has_probe_result());
565 const rtclog::BweProbeResult& pr_event = event.probe_result();
566 BweProbeResultEvent res;
567 res.timestamp = GetTimestamp(index);
568 RTC_CHECK(pr_event.has_id());
569 res.id = pr_event.id();
570
571 RTC_CHECK(pr_event.has_result());
572 if (pr_event.result() == rtclog::BweProbeResult::SUCCESS) {
573 RTC_CHECK(pr_event.has_bitrate_bps());
574 res.bitrate_bps = rtc::Optional<uint64_t>(pr_event.bitrate_bps());
575 } else if (pr_event.result() ==
576 rtclog::BweProbeResult::INVALID_SEND_RECEIVE_INTERVAL) {
577 res.failure_reason =
578 rtc::Optional<ProbeFailureReason>(kInvalidSendReceiveInterval);
579 } else if (pr_event.result() ==
580 rtclog::BweProbeResult::INVALID_SEND_RECEIVE_RATIO) {
581 res.failure_reason =
582 rtc::Optional<ProbeFailureReason>(kInvalidSendReceiveRatio);
583 } else if (pr_event.result() == rtclog::BweProbeResult::TIMEOUT) {
584 res.failure_reason = rtc::Optional<ProbeFailureReason>(kTimeout);
585 } else {
586 RTC_NOTREACHED();
587 }
588
589 return res;
590 }
537 } // namespace webrtc 591 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/logging/rtc_event_log/rtc_event_log_parser.h ('k') | webrtc/tools/event_log_visualizer/analyzer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698