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

Side by Side Diff: content/renderer/media/rtc_data_channel_handler.cc

Issue 274453004: Adds UMA histograms for WebRTC.DataChannelMaxRetransmits WebRTC.DataChannelMaxRetransmitTime. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/rtc_data_channel_handler.h" 5 #include "content/renderer/media/rtc_data_channel_handler.h"
6 6
7 #include <limits>
7 #include <string> 8 #include <string>
8 9
9 #include "base/logging.h" 10 #include "base/logging.h"
10 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
11 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
12 13
13 namespace content { 14 namespace content {
14 15
15 namespace { 16 namespace {
16 17
(...skipping 21 matching lines...) Expand all
38 DVLOG(1) << "::ctor"; 39 DVLOG(1) << "::ctor";
39 channel_->RegisterObserver(this); 40 channel_->RegisterObserver(this);
40 41
41 IncrementCounter(CHANNEL_CREATED); 42 IncrementCounter(CHANNEL_CREATED);
42 if (isReliable()) 43 if (isReliable())
43 IncrementCounter(CHANNEL_RELIABLE); 44 IncrementCounter(CHANNEL_RELIABLE);
44 if (ordered()) 45 if (ordered())
45 IncrementCounter(CHANNEL_ORDERED); 46 IncrementCounter(CHANNEL_ORDERED);
46 if (negotiated()) 47 if (negotiated())
47 IncrementCounter(CHANNEL_NEGOTIATED); 48 IncrementCounter(CHANNEL_NEGOTIATED);
49
50 UMA_HISTOGRAM_CUSTOM_COUNTS("WebRTC.DataChannelMaxRetransmits",
51 maxRetransmits(), 1,
jiayl 2014/05/07 16:25:07 min should be 0
perkj_chrome 2014/05/07 17:53:56 oops - I thought this was the size of each slot in
52 std::numeric_limits<unsigned short>::max(), 50);
53 UMA_HISTOGRAM_CUSTOM_COUNTS("WebRTC.DataChannelMaxRetransmitTime",
54 maxRetransmitTime(), 1,
jiayl 2014/05/07 16:25:07 min should be 0
perkj_chrome 2014/05/07 17:53:56 Done.
55 std::numeric_limits<unsigned short>::max(), 50);
48 } 56 }
49 57
50 RtcDataChannelHandler::~RtcDataChannelHandler() { 58 RtcDataChannelHandler::~RtcDataChannelHandler() {
51 DVLOG(1) << "::dtor"; 59 DVLOG(1) << "::dtor";
52 channel_->UnregisterObserver(); 60 channel_->UnregisterObserver();
53 } 61 }
54 62
55 void RtcDataChannelHandler::setClient( 63 void RtcDataChannelHandler::setClient(
56 blink::WebRTCDataChannelHandlerClient* client) { 64 blink::WebRTCDataChannelHandlerClient* client) {
57 webkit_client_ = client; 65 webkit_client_ = client;
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 num_bytes, 186 num_bytes,
179 1, kMaxBucketSize, kNumBuckets); 187 1, kMaxBucketSize, kNumBuckets);
180 } else { 188 } else {
181 UMA_HISTOGRAM_CUSTOM_COUNTS("WebRTC.UnreliableDataChannelMessageSize", 189 UMA_HISTOGRAM_CUSTOM_COUNTS("WebRTC.UnreliableDataChannelMessageSize",
182 num_bytes, 190 num_bytes,
183 1, kMaxBucketSize, kNumBuckets); 191 1, kMaxBucketSize, kNumBuckets);
184 } 192 }
185 } 193 }
186 194
187 } // namespace content 195 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698