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

Unified Diff: webrtc/p2p/base/port.h

Issue 1940493002: Add Stats to Stun ping. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add three more counters for stun ping. Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/p2p/base/port.h
diff --git a/webrtc/p2p/base/port.h b/webrtc/p2p/base/port.h
index 937f3cd0284f058e12fc6a47848ac0ad8ec98204..f23f2f9dfcdc5e72bc04b6c55bb8556e6f844afb 100644
--- a/webrtc/p2p/base/port.h
+++ b/webrtc/p2p/base/port.h
@@ -475,8 +475,13 @@ class Connection : public CandidatePairInterface,
// to errors.
size_t sent_discarded_packets();
size_t sent_total_packets();
+ size_t sent_ping_requests_total();
+ size_t sent_ping_requests_before_first_response();
+ size_t sent_ping_responses();
size_t recv_total_bytes();
size_t recv_bytes_second();
+ size_t recv_ping_responses();
+ size_t recv_ping_requests();
sigslot::signal1<Connection*> SignalStateChange;
// Sent when the connection has decided that it is no longer of value. It
@@ -645,6 +650,12 @@ class Connection : public CandidatePairInterface,
rtc::RateTracker send_rate_tracker_;
uint32_t sent_packets_discarded_;
uint32_t sent_packets_total_;
+ // Stun ping related stats.
+ uint32_t sent_ping_requests_total_;
+ uint32_t sent_ping_requests_before_first_response_;
+ uint32_t sent_ping_responses_;
+ uint32_t recv_ping_requests_;
+ uint32_t recv_ping_responses_;
pthatcher1 2016/05/27 21:27:15 Can we just store a ConnectionInfo value here inst
zhihuang1 2016/06/01 21:30:05 Do you mean renaming ConnectionInfo -> IceCandidat
pthatcher1 2016/06/01 21:39:48 In a separate CL is fine.
private:
void MaybeAddPrflxCandidate(ConnectionRequest* request,
@@ -655,6 +666,7 @@ class Connection : public CandidatePairInterface,
// Time duration to switch from receiving to not receiving.
int receiving_timeout_;
int64_t time_created_ms_;
+ bool received_first_response_;
pthatcher1 2016/05/27 21:27:15 Can you tell by "recv_ping_reponses_ > 0"?
friend class Port;
friend class ConnectionRequest;

Powered by Google App Engine
This is Rietveld 408576698