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

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

Issue 2806653002: Add UMA to track why a download is non-parallel when enabled parallel (Closed)
Patch Set: Polish on the comment. 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 // 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/macros.h" 7 #include "base/macros.h"
8 #include "base/metrics/histogram_functions.h" 8 #include "base/metrics/histogram_functions.h"
9 #include "base/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
10 #include "base/metrics/sparse_histogram.h" 10 #include "base/metrics/sparse_histogram.h"
(...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 UMA_HISTOGRAM_CUSTOM_COUNTS( 809 UMA_HISTOGRAM_CUSTOM_COUNTS(
810 "Download.EstimatedTimeSavedWithParallelDownload", 810 "Download.EstimatedTimeSavedWithParallelDownload",
811 time_saved.InMilliseconds(), 0, kMillisecondsPerHour, 50); 811 time_saved.InMilliseconds(), 0, kMillisecondsPerHour, 50);
812 } else { 812 } else {
813 UMA_HISTOGRAM_CUSTOM_COUNTS( 813 UMA_HISTOGRAM_CUSTOM_COUNTS(
814 "Download.EstimatedTimeWastedWithParallelDownload", 814 "Download.EstimatedTimeWastedWithParallelDownload",
815 -time_saved.InMilliseconds(), 0, kMillisecondsPerHour, 50); 815 -time_saved.InMilliseconds(), 0, kMillisecondsPerHour, 50);
816 } 816 }
817 } 817 }
818 818
819 void RecordParallelDownloadCreationEvent(ParallelDownloadCreationEvent event) {
820 UMA_HISTOGRAM_ENUMERATION("Download.ParallelDownload.CreationEvent", event,
821 ParallelDownloadCreationEvent::COUNT);
822 }
823
819 void RecordDownloadFileRenameResultAfterRetry( 824 void RecordDownloadFileRenameResultAfterRetry(
820 base::TimeDelta time_since_first_failure, 825 base::TimeDelta time_since_first_failure,
821 DownloadInterruptReason interrupt_reason) { 826 DownloadInterruptReason interrupt_reason) {
822 if (interrupt_reason == DOWNLOAD_INTERRUPT_REASON_NONE) { 827 if (interrupt_reason == DOWNLOAD_INTERRUPT_REASON_NONE) {
823 UMA_HISTOGRAM_TIMES("Download.TimeToRenameSuccessAfterInitialFailure", 828 UMA_HISTOGRAM_TIMES("Download.TimeToRenameSuccessAfterInitialFailure",
824 time_since_first_failure); 829 time_since_first_failure);
825 } else { 830 } else {
826 UMA_HISTOGRAM_TIMES("Download.TimeToRenameFailureAfterInitialFailure", 831 UMA_HISTOGRAM_TIMES("Download.TimeToRenameFailureAfterInitialFailure",
827 time_since_first_failure); 832 time_since_first_failure);
828 } 833 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 if (!page_transition) 898 if (!page_transition)
894 return; 899 return;
895 900
896 UMA_HISTOGRAM_ENUMERATION( 901 UMA_HISTOGRAM_ENUMERATION(
897 "Download.PageTransition", 902 "Download.PageTransition",
898 ui::PageTransitionStripQualifier(page_transition.value()), 903 ui::PageTransitionStripQualifier(page_transition.value()),
899 ui::PAGE_TRANSITION_LAST_CORE + 1); 904 ui::PAGE_TRANSITION_LAST_CORE + 1);
900 } 905 }
901 906
902 } // namespace content 907 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/download_stats.h ('k') | content/browser/download/parallel_download_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698