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

Unified Diff: content/browser/download/download_stats.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/download/download_job_factory.cc ('k') | content/browser/download/download_stats.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/download_stats.h
diff --git a/content/browser/download/download_stats.h b/content/browser/download/download_stats.h
index 0c4a5be726edf4de5dd19f07118aec46ae9dce35..e4da2f4d2d2f3584d67584610aad98635639909a 100644
--- a/content/browser/download/download_stats.h
+++ b/content/browser/download/download_stats.h
@@ -145,6 +145,39 @@ enum DownloadDiscardReason {
DOWNLOAD_DISCARD_DUE_TO_SHUTDOWN
};
+// When parallel download is enabled, the download may fall back to a normal
+// download for various reasons. This enum counts the number of parallel
+// download and fallbacks. Also records the reasons why the download falls back
+// to a normal download. The reasons are not mutually exclusive.
+// Used in histogram "Download.ParallelDownload.CreationEvent" and should be
+// treated as append-only.
+enum class ParallelDownloadCreationEvent {
+ // The total number of downloads started as parallel download.
+ STARTED_PARALLEL_DOWNLOAD = 0,
+
+ // The total number of downloads fell back to normal download when parallel
+ // download is enabled.
+ FELL_BACK_TO_NORMAL_DOWNLOAD,
+
+ // No ETag or Last-Modified response header.
+ FALLBACK_REASON_STRONG_VALIDATORS,
+
+ // No Accept-Range response header.
+ FALLBACK_REASON_ACCEPT_RANGE_HEADER,
+
+ // No Content-Length response header.
+ FALLBACK_REASON_CONTENT_LENGTH_HEADER,
+
+ // File size is not complied to finch configuration.
+ FALLBACK_REASON_FILE_SIZE,
+
+ // The HTTP connection type does not meet the requirement.
+ FALLBACK_REASON_CONNECTION_TYPE,
+
+ // Last entry of the enum.
+ COUNT,
+};
+
// Increment one of the above counts.
void RecordDownloadCount(DownloadCountTypes type);
@@ -236,6 +269,10 @@ void RecordParallelDownloadStats(
size_t bytes_downloaded_without_parallel_streams,
base::TimeDelta time_without_parallel_streams);
+// Records the parallel download creation counts and the reasons why the
+// download falls back to non-parallel download.
+void RecordParallelDownloadCreationEvent(ParallelDownloadCreationEvent event);
+
// Record the result of a download file rename.
void RecordDownloadFileRenameResultAfterRetry(
base::TimeDelta time_since_first_failure,
« no previous file with comments | « content/browser/download/download_job_factory.cc ('k') | content/browser/download/download_stats.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698