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

Side by Side Diff: content/browser/cache_storage/cache_storage_histogram_macros.h

Issue 2168123002: [CacheStorage] Add metrics to the scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add unit Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_HISTOGRAM_MACROS_H_
6 #define CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_HISTOGRAM_MACROS_H_
7
8 #include "base/metrics/histogram_macros.h"
9 #include "content/browser/cache_storage/cache_storage_scheduler_client.h"
10
11 namespace content {
12
13 // Metrics to make it easier to write histograms for several clients.
14 #define CACHE_STORAGE_SCHEDULER_UMA_THUNK(uma_type, args) \
15 UMA_HISTOGRAM_##uma_type args
16 #define CACHE_STORAGE_SCHEDULER_UMA(uma_type, uma_name, client_type, ...) \
17 do { \
18 switch (client_type) { \
19 case CacheStorageSchedulerClient::CLIENT_STORAGE: \
20 CACHE_STORAGE_SCHEDULER_UMA_THUNK( \
21 uma_type, ("ServiceWorkerCache.CacheStorage.Scheduler." uma_name, \
22 ##__VA_ARGS__)); \
23 break; \
24 case CacheStorageSchedulerClient::CLIENT_CACHE: \
25 CACHE_STORAGE_SCHEDULER_UMA_THUNK( \
26 uma_type, \
27 ("ServiceWorkerCache.Cache.Scheduler." uma_name, ##__VA_ARGS__)); \
28 break; \
29 case CacheStorageSchedulerClient::CLIENT_BACKGROUND_SYNC: \
30 CACHE_STORAGE_SCHEDULER_UMA_THUNK( \
31 uma_type, \
32 ("ServiceWorkerCache.BackgroundSyncManager.Scheduler." uma_name, \
33 ##__VA_ARGS__)); \
34 break; \
35 default: \
36 NOTREACHED(); \
37 break; \
38 } \
39 } while (0)
40
41 } // namespace content
42
43 #endif // CONTENT_BROWSER_CACHE_STORAGE_CACHE_STORAGE_HISTOGRAM_MACROS_H_
OLDNEW
« no previous file with comments | « content/browser/cache_storage/cache_storage_cache.cc ('k') | content/browser/cache_storage/cache_storage_operation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698