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

Side by Side Diff: chrome/test/data/extensions/api_test/metrics/test.js

Issue 213433003: Add Sparse Histogram Support to metricsPrivate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Typo Created 6 years, 9 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 | Annotate | Revision Log
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 // metrics api test 5 // metrics api test
6 // browser_tests.exe --gtest_filter=ExtensionApiTest.Metrics 6 // browser_tests.exe --gtest_filter=ExtensionApiTest.Metrics
7 7
8 // Any changes to the logging done in these functions should be matched 8 // Any changes to the logging done in these functions should be matched
9 // with the checks done in IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Metrics). 9 // with the checks done in IN_PROC_BROWSER_TEST_F(ExtensionApiTest, Metrics).
10 // See metrics_apitest.cc. 10 // See metrics_apitest.cc.
(...skipping 25 matching lines...) Expand all
36 'max': 200, 36 'max': 200,
37 'buckets': 50 37 'buckets': 50
38 }, 42); 38 }, 42);
39 39
40 chrome.metricsPrivate.recordPercentage('test.h.3', 42); 40 chrome.metricsPrivate.recordPercentage('test.h.3', 42);
41 chrome.metricsPrivate.recordPercentage('test.h.3', 42); 41 chrome.metricsPrivate.recordPercentage('test.h.3', 42);
42 42
43 chrome.test.succeed(); 43 chrome.test.succeed();
44 }, 44 },
45 45
46 function recordSparseValue() {
47 chrome.metricsPrivate.recordSparseValue('test.sparse.1', 42);
48 chrome.metricsPrivate.recordSparseValue('test.sparse.2', 42);
49 chrome.metricsPrivate.recordSparseValue('test.sparse.2', 42);
Ilya Sherman 2014/03/26 22:02:03 It would be nice to verify that more buckets than
robliao 2014/03/26 22:30:50 Done.
50
51 chrome.test.succeed();
52 },
53
46 function recordTimes() { 54 function recordTimes() {
47 chrome.metricsPrivate.recordTime('test.time', 42); 55 chrome.metricsPrivate.recordTime('test.time', 42);
48 chrome.metricsPrivate.recordMediumTime('test.medium.time', 42 * 1000); 56 chrome.metricsPrivate.recordMediumTime('test.medium.time', 42 * 1000);
49 chrome.metricsPrivate.recordLongTime('test.long.time', 42 * 1000 * 60); 57 chrome.metricsPrivate.recordLongTime('test.long.time', 42 * 1000 * 60);
50 58
51 chrome.test.succeed(); 59 chrome.test.succeed();
52 }, 60 },
53 61
54 function recordCounts() { 62 function recordCounts() {
55 chrome.metricsPrivate.recordCount('test.count', 420000); 63 chrome.metricsPrivate.recordCount('test.count', 420000);
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // This one should be rejected because the bucket count is different. 140 // This one should be rejected because the bucket count is different.
133 // We check for sample count == 2 in metrics_apitest.cc 141 // We check for sample count == 2 in metrics_apitest.cc
134 chrome.metricsPrivate.recordValue(log2, 42); 142 chrome.metricsPrivate.recordValue(log2, 42);
135 chrome.metricsPrivate.recordValue(log1, 42); 143 chrome.metricsPrivate.recordValue(log1, 42);
136 144
137 chrome.test.succeed(); 145 chrome.test.succeed();
138 }, 146 },
139 147
140 ]); 148 ]);
141 149
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698