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

Side by Side Diff: content/browser/download/download_stats.cc

Issue 10074001: Initial implementation of the ByteStream refactor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
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/browser/download/download_stats.h" 5 #include "content/browser/download/download_stats.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "content/browser/download/download_resource_handler.h" 9 #include "content/browser/download/download_resource_handler.h"
10 #include "content/public/browser/download_interrupt_reasons.h" 10 #include "content/public/browser/download_interrupt_reasons.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 248
249 // Record the value. 249 // Record the value.
250 UMA_HISTOGRAM_ENUMERATION("Download.ContentType", 250 UMA_HISTOGRAM_ENUMERATION("Download.ContentType",
251 download_content, 251 download_content,
252 DOWNLOAD_CONTENT_MAX); 252 DOWNLOAD_CONTENT_MAX);
253 } 253 }
254 254
255 void RecordFileThreadReceiveBuffers(size_t num_buffers) { 255 void RecordFileThreadReceiveBuffers(size_t num_buffers) {
256 UMA_HISTOGRAM_CUSTOM_COUNTS( 256 UMA_HISTOGRAM_CUSTOM_COUNTS(
257 "Download.FileThreadReceiveBuffers", num_buffers, 1, 257 "Download.FileThreadReceiveBuffers", num_buffers, 1,
258 DownloadResourceHandler::kLoadsToWrite, 258 100, 100);
259 DownloadResourceHandler::kLoadsToWrite);
260 } 259 }
261 260
262 void RecordBandwidth(double actual_bandwidth, double potential_bandwidth) { 261 void RecordBandwidth(double actual_bandwidth, double potential_bandwidth) {
263 UMA_HISTOGRAM_CUSTOM_COUNTS( 262 UMA_HISTOGRAM_CUSTOM_COUNTS(
264 "Download.ActualBandwidth", actual_bandwidth, 1, 1000000000, 50); 263 "Download.ActualBandwidth", actual_bandwidth, 1, 1000000000, 50);
265 UMA_HISTOGRAM_CUSTOM_COUNTS( 264 UMA_HISTOGRAM_CUSTOM_COUNTS(
266 "Download.PotentialBandwidth", potential_bandwidth, 1, 1000000000, 50); 265 "Download.PotentialBandwidth", potential_bandwidth, 1, 1000000000, 50);
267 UMA_HISTOGRAM_PERCENTAGE( 266 UMA_HISTOGRAM_PERCENTAGE(
268 "Download.BandwidthUsed", 267 "Download.BandwidthUsed",
269 (int) ((actual_bandwidth * 100)/ potential_bandwidth)); 268 (int) ((actual_bandwidth * 100)/ potential_bandwidth));
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 64/*num_buckets*/); 302 64/*num_buckets*/);
304 } 303 }
305 304
306 void RecordSavePackageEvent(SavePackageEvent event) { 305 void RecordSavePackageEvent(SavePackageEvent event) {
307 UMA_HISTOGRAM_ENUMERATION("Download.SavePackage", 306 UMA_HISTOGRAM_ENUMERATION("Download.SavePackage",
308 event, 307 event,
309 SAVE_PACKAGE_LAST_ENTRY); 308 SAVE_PACKAGE_LAST_ENTRY);
310 } 309 }
311 310
312 } // namespace download_stats 311 } // namespace download_stats
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698