rtcstats_objects.h updated with TODOs about stats not being collected

or not being collected correctly.

These TODOs are already documented and in greater detail in
rtcstatscollector.cc, but if every discrepency is listed in
rtcstats_objects.h it is easier to get an overview of the progress of
the new GetStats API.

BUG=chromium:627816
TBR=hta@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2443163002
Cr-Commit-Position: refs/heads/master@{#14749}
This commit is contained in:
hbos 2016-10-24 09:27:10 -07:00 committed by Commit bot
parent a6f495c7c2
commit 5d79a7cb1f
3 changed files with 28 additions and 23 deletions

View File

@ -291,12 +291,6 @@ void RTCStatsCollector::ProduceIceCandidateAndPairStats_s(
RTCIceCandidatePairStatsIDFromConnectionInfo(info),
timestamp_us));
// TODO(hbos): Set all of the |RTCIceCandidatePairStats|'s members,
// crbug.com/633550.
// TODO(hbos): Set candidate_pair_stats->transport_id. Should be ID to
// RTCTransportStats which does not exist yet: crbug.com/653873.
// TODO(hbos): There could be other candidates that are not paired with
// anything. We don't have a complete list. Local candidates come from
// Port objects, and prflx candidates (both local and remote) are only
@ -306,39 +300,25 @@ void RTCStatsCollector::ProduceIceCandidateAndPairStats_s(
candidate_pair_stats->remote_candidate_id = ProduceIceCandidateStats_s(
timestamp_us, info.remote_candidate, false, report);
// TODO(hbos): Set candidate_pair_stats->state.
// TODO(hbos): Set candidate_pair_stats->priority.
// TODO(hbos): Set candidate_pair_stats->nominated.
// TODO(hbos): This writable is different than the spec. It goes to
// false after a certain amount of time without a response passes.
// crbug.com/633550
candidate_pair_stats->writable = info.writable;
// TODO(hbos): Set candidate_pair_stats->readable.
candidate_pair_stats->bytes_sent =
static_cast<uint64_t>(info.sent_total_bytes);
candidate_pair_stats->bytes_received =
static_cast<uint64_t>(info.recv_total_bytes);
// TODO(hbos): Set candidate_pair_stats->total_rtt.
// TODO(hbos): The |info.rtt| measurement is smoothed. It shouldn't be
// smoothed according to the spec. crbug.com/633550. See
// https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatepairstats-currentrtt
candidate_pair_stats->current_rtt =
static_cast<double>(info.rtt) / 1000.0;
// TODO(hbos): Set candidate_pair_stats->available_outgoing_bitrate.
// TODO(hbos): Set candidate_pair_stats->available_incoming_bitrate.
// TODO(hbos): Set candidate_pair_stats->requests_received.
candidate_pair_stats->requests_sent =
static_cast<uint64_t>(info.sent_ping_requests_total);
candidate_pair_stats->responses_received =
static_cast<uint64_t>(info.recv_ping_responses);
candidate_pair_stats->responses_sent =
static_cast<uint64_t>(info.sent_ping_responses);
// TODO(hbos): Set candidate_pair_stats->retransmissions_received.
// TODO(hbos): Set candidate_pair_stats->retransmissions_sent.
// TODO(hbos): Set candidate_pair_stats->consent_requests_received.
// TODO(hbos): Set candidate_pair_stats->consent_requests_sent.
// TODO(hbos): Set candidate_pair_stats->consent_responses_received.
// TODO(hbos): Set candidate_pair_stats->consent_responses_sent.
report->AddStats(std::move(candidate_pair_stats));
}
@ -364,7 +344,6 @@ const std::string& RTCStatsCollector::ProduceIceCandidateStats_s(
candidate_stats->candidate_type = CandidateTypeToRTCIceCandidateType(
candidate.type());
candidate_stats->priority = static_cast<int32_t>(candidate.priority());
// TODO(hbos): Define candidate_stats->url. crbug.com/632723
stats = candidate_stats.get();
report->AddStats(std::move(candidate_stats));

View File

@ -375,7 +375,7 @@ class RTCStatsCollectorTest : public testing::Test {
// TODO(hbos): Define all the undefined |candidate_pair_stats| stats.
// The EXPECT_FALSE are for the undefined stats, see also todos listed
// in rtcstatscollector.cc. crbug.com/633550
// in rtcstats_objects.h. crbug.com/633550
EXPECT_FALSE(candidate_pair_stats.transport_id.is_defined());
const RTCIceCandidateStats* local_candidate =
ExpectReportContainsCandidate(report, info.local_candidate, true);

View File

@ -91,36 +91,57 @@ class RTCIceCandidatePairStats : public RTCStats {
RTCIceCandidatePairStats(const RTCIceCandidatePairStats& other);
~RTCIceCandidatePairStats() override;
// TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550, 653873
RTCStatsMember<std::string> transport_id;
RTCStatsMember<std::string> local_candidate_id;
RTCStatsMember<std::string> remote_candidate_id;
// TODO(hbos): Support enum types?
// "RTCStatsMember<RTCStatsIceCandidatePairState>"?
// TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550
RTCStatsMember<std::string> state;
// TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550
RTCStatsMember<uint64_t> priority;
// TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550
RTCStatsMember<bool> nominated;
// TODO(hbos): Collected by |RTCStatsCollector| but different than the spec.
// crbug.com/633550
RTCStatsMember<bool> writable;
// TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550
RTCStatsMember<bool> readable;
RTCStatsMember<uint64_t> bytes_sent;
RTCStatsMember<uint64_t> bytes_received;
// TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550
RTCStatsMember<double> total_rtt;
// TODO(hbos): Collected by |RTCStatsCollector| but different than the spec.
// crbug.com/633550
RTCStatsMember<double> current_rtt;
// TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550
RTCStatsMember<double> available_outgoing_bitrate;
// TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550
RTCStatsMember<double> available_incoming_bitrate;
// TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550
RTCStatsMember<uint64_t> requests_received;
RTCStatsMember<uint64_t> requests_sent;
RTCStatsMember<uint64_t> responses_received;
RTCStatsMember<uint64_t> responses_sent;
// TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550
RTCStatsMember<uint64_t> retransmissions_received;
// TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550
RTCStatsMember<uint64_t> retransmissions_sent;
// TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550
RTCStatsMember<uint64_t> consent_requests_received;
// TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550
RTCStatsMember<uint64_t> consent_requests_sent;
// TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550
RTCStatsMember<uint64_t> consent_responses_received;
// TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/633550
RTCStatsMember<uint64_t> consent_responses_sent;
};
// https://w3c.github.io/webrtc-stats/#icecandidate-dict*
// TODO(hbos): Finish implementation. Tracking bug crbug.com/632723
// TODO(hbos): |RTCStatsCollector| only collects candidates that are part of
// ice candidate pairs, but there could be candidates not paired with anything.
// crbug.com/632723
class RTCIceCandidateStats : public RTCStats {
public:
WEBRTC_RTCSTATS_DECL();
@ -134,6 +155,7 @@ class RTCIceCandidateStats : public RTCStats {
// TODO(hbos): Support enum types? "RTCStatsMember<RTCIceCandidateType>"?
RTCStatsMember<std::string> candidate_type;
RTCStatsMember<int32_t> priority;
// TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/632723
RTCStatsMember<std::string> url;
protected:
@ -172,7 +194,11 @@ class RTCPeerConnectionStats final : public RTCStats {
RTCPeerConnectionStats(const RTCPeerConnectionStats& other);
~RTCPeerConnectionStats() override;
// TODO(hbos): Collected by |RTCStatsCollector| but different than the spec.
// crbug.com/636818
RTCStatsMember<uint32_t> data_channels_opened;
// TODO(hbos): Collected by |RTCStatsCollector| but different than the spec.
// crbug.com/636818
RTCStatsMember<uint32_t> data_channels_closed;
};