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

Side by Side Diff: webkit/appcache/appcache_histograms.h

Issue 8572048: Histogram appcache task queue and run times. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef WEBKIT_APPCACHE_APPCACHE_HISTOGRAMS_H_ 5 #ifndef WEBKIT_APPCACHE_APPCACHE_HISTOGRAMS_H_
6 #define WEBKIT_APPCACHE_APPCACHE_HISTOGRAMS_H_ 6 #define WEBKIT_APPCACHE_APPCACHE_HISTOGRAMS_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 10
11 namespace base {
12 class TimeDelta;
13 }
14
11 namespace appcache { 15 namespace appcache {
12 16
13 class AppCacheHistograms { 17 class AppCacheHistograms {
14 public: 18 public:
15 enum InitResultType { 19 enum InitResultType {
16 INIT_OK, SQL_DATABASE_ERROR, DISK_CACHE_ERROR, 20 INIT_OK, SQL_DATABASE_ERROR, DISK_CACHE_ERROR,
17 NUM_INIT_RESULT_TYPES 21 NUM_INIT_RESULT_TYPES
18 }; 22 };
19 static void CountInitResult(InitResultType init_result); 23 static void CountInitResult(InitResultType init_result);
20 24
21 enum CheckResponseResultType { 25 enum CheckResponseResultType {
22 RESPONSE_OK, MANIFEST_OUT_OF_DATE, RESPONSE_OUT_OF_DATE, ENTRY_NOT_FOUND, 26 RESPONSE_OK, MANIFEST_OUT_OF_DATE, RESPONSE_OUT_OF_DATE, ENTRY_NOT_FOUND,
23 READ_HEADERS_ERROR, READ_DATA_ERROR, UNEXPECTED_DATA_SIZE, CHECK_CANCELED, 27 READ_HEADERS_ERROR, READ_DATA_ERROR, UNEXPECTED_DATA_SIZE, CHECK_CANCELED,
24 NUM_CHECK_RESPONSE_RESULT_TYPES 28 NUM_CHECK_RESPONSE_RESULT_TYPES
25 }; 29 };
26 static void CountCheckResponseResult(CheckResponseResultType result); 30 static void CountCheckResponseResult(CheckResponseResultType result);
27 31
32 static void AddTaskQueueTimeSample(const base::TimeDelta& duration);
33 static void AddTaskRunTimeSample(const base::TimeDelta& duration);
34 static void AddTaskCompletionTimeSample(const base::TimeDelta& duration);
35
28 private: 36 private:
29 DISALLOW_IMPLICIT_CONSTRUCTORS(AppCacheHistograms); 37 DISALLOW_IMPLICIT_CONSTRUCTORS(AppCacheHistograms);
30 }; 38 };
31 39
32 } // namespace appcache 40 } // namespace appcache
33 41
34 #endif // WEBKIT_APPCACHE_APPCACHE_HISTOGRAMS_H_ 42 #endif // WEBKIT_APPCACHE_APPCACHE_HISTOGRAMS_H_
OLDNEW
« no previous file with comments | « no previous file | webkit/appcache/appcache_histograms.cc » ('j') | webkit/appcache/appcache_histograms.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698