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

Unified Diff: chrome/browser/net/cache_stats.h

Issue 10834313: Add histograms for network activity, and total/cumulative (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | « no previous file | chrome/browser/net/cache_stats.cc » ('j') | chrome/browser/net/cache_stats.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/cache_stats.h
===================================================================
--- chrome/browser/net/cache_stats.h (revision 150909)
+++ chrome/browser/net/cache_stats.h (working copy)
@@ -51,11 +51,28 @@
SPINNER_START,
SPINNER_STOP
};
+ enum RequestStatus {
+ REQUEST_STATUS_CACHE_WAIT,
+ REQUEST_STATUS_NETWORK_WAIT,
+ REQUEST_STATUS_ACTIVE,
+ REQUEST_STATUS_NONE,
+ REQUEST_STATUS_MAX
+ };
+ enum HistogramType {
+ HISTOGRAM_FINAL_AGGREGATE,
+ HISTOGRAM_FINAL_CUMULATIVE,
+ HISTOGRAM_FINAL_CUMULATIVE_PERCENTAGE,
+ HISTOGRAM_INTERMEDIATE_AGGREGATE,
+ HISTOGRAM_INTERMEDIATE_CUMULATIVE,
+ HISTOGRAM_INTERMEDIATE_CUMULATIVE_PERCENTAGE,
+ HISTOGRAM_MAX
+ };
mmenke 2012/08/15 18:45:41 Neither of these two new enumerations is needed in
tburkard 2012/08/15 21:05:56 Yes, they are needed for the declaration of histog
+
CacheStats();
~CacheStats();
- void OnCacheWaitStateChange(const net::URLRequest& request,
- net::NetworkDelegate::CacheWaitState state);
+ void OnRequestWaitStateChange(const net::URLRequest& request,
+ net::NetworkDelegate::RequestWaitState state);
void OnTabEvent(std::pair<int, int> render_view_id, TabEvent event);
void RegisterURLRequestContext(const net::URLRequestContext* context,
ChromeURLRequestContext::ContextType type);
@@ -77,16 +94,13 @@
void ScheduleTimer(TabLoadStats* stats);
// The callback when a timer fires to collect stats again.
void TimerCallback(TabLoadStats* stats);
- // Helper function to put the current set of cache statistics into an UMA
- // histogram.
- void RecordCacheFractionHistogram(base::TimeDelta elapsed,
- base::TimeDelta cache_time,
- bool is_load_done,
- int timer_index);
+ // Helper function to put the current set of statistics into UMA histograms.
+ void RecordHistograms(base::TimeDelta elapsed,
+ TabLoadStats* stats,
+ bool is_load_done);
TabLoadStatsMap tab_load_stats_;
- std::vector<base::Histogram*> final_histograms_;
- std::vector<base::Histogram*> intermediate_histograms_;
+ std::vector<base::Histogram*> histograms_[REQUEST_STATUS_MAX][HISTOGRAM_MAX];
base::hash_set<const net::URLRequestContext*> main_request_contexts_;
DISALLOW_COPY_AND_ASSIGN(CacheStats);
« no previous file with comments | « no previous file | chrome/browser/net/cache_stats.cc » ('j') | chrome/browser/net/cache_stats.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698