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

Side by Side Diff: third_party/WebKit/Source/core/frame/UseCounter.cpp

Issue 2614213002: Finalize new UseCounter histogram names (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/UseCounterTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google, Inc. All rights reserved. 2 * Copyright (C) 2012 Google, Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after
1258 return 0; 1258 return 0;
1259 } 1259 }
1260 1260
1261 EnumerationHistogram& UseCounter::featuresHistogram() const { 1261 EnumerationHistogram& UseCounter::featuresHistogram() const {
1262 // Every SVGImage has it's own Page instance, and multiple web pages can 1262 // Every SVGImage has it's own Page instance, and multiple web pages can
1263 // share the usage of a single SVGImage. Ideally perhaps we'd delegate 1263 // share the usage of a single SVGImage. Ideally perhaps we'd delegate
1264 // metrics from an SVGImage to one of the Page's it's displayed in, but 1264 // metrics from an SVGImage to one of the Page's it's displayed in, but
1265 // that's tricky (SVGImage is intentionally isolated, and the Page that 1265 // that's tricky (SVGImage is intentionally isolated, and the Page that
1266 // created it may not even exist anymore). 1266 // created it may not even exist anymore).
1267 // So instead we just use a dedicated histogram for the SVG case. 1267 // So instead we just use a dedicated histogram for the SVG case.
1268 DEFINE_STATIC_LOCAL(blink::EnumerationHistogram, histogram, 1268 DEFINE_STATIC_LOCAL(
1269 ("WebCore.UseCounter_TEST.Features", 1269 blink::EnumerationHistogram, histogram,
1270 blink::UseCounter::NumberOfFeatures)); 1270 ("Blink.UseCounter.Features", blink::UseCounter::NumberOfFeatures));
1271 DEFINE_STATIC_LOCAL(blink::EnumerationHistogram, svgHistogram, 1271 DEFINE_STATIC_LOCAL(blink::EnumerationHistogram, svgHistogram,
1272 ("WebCore.UseCounter_TEST.SVGImage.Features", 1272 ("Blink.UseCounter.SVGImage.Features",
1273 blink::UseCounter::NumberOfFeatures)); 1273 blink::UseCounter::NumberOfFeatures));
1274 1274
1275 return m_context == SVGImageContext ? svgHistogram : histogram; 1275 return m_context == SVGImageContext ? svgHistogram : histogram;
1276 } 1276 }
1277 1277
1278 EnumerationHistogram& UseCounter::cssHistogram() const { 1278 EnumerationHistogram& UseCounter::cssHistogram() const {
1279 DEFINE_STATIC_LOCAL( 1279 DEFINE_STATIC_LOCAL(blink::EnumerationHistogram, histogram,
1280 blink::EnumerationHistogram, histogram, 1280 ("Blink.UseCounter.CSSProperties", kMaximumCSSSampleId));
1281 ("WebCore.UseCounter_TEST.CSSProperties", kMaximumCSSSampleId));
1282 DEFINE_STATIC_LOCAL( 1281 DEFINE_STATIC_LOCAL(
1283 blink::EnumerationHistogram, svgHistogram, 1282 blink::EnumerationHistogram, svgHistogram,
1284 ("WebCore.UseCounter_TEST.SVGImage.CSSProperties", kMaximumCSSSampleId)); 1283 ("Blink.UseCounter.SVGImage.CSSProperties", kMaximumCSSSampleId));
1285 1284
1286 return m_context == SVGImageContext ? svgHistogram : histogram; 1285 return m_context == SVGImageContext ? svgHistogram : histogram;
1287 } 1286 }
1288 1287
1289 /* 1288 /*
1290 * 1289 *
1291 * LEGACY metrics support - WebCore.FeatureObserver is to be superceded by 1290 * LEGACY metrics support - WebCore.FeatureObserver is to be superceded by
1292 * WebCore.UseCounter 1291 * WebCore.UseCounter
tyoshino (SeeGerritForStatus) 2017/03/27 05:54:07 This should be also updated?
Rick Byers 2017/03/27 16:24:47 Yep, sorry I missed that. I'm pretty close to bei
1293 * 1292 *
1294 */ 1293 */
1295 1294
1296 static EnumerationHistogram& featureObserverHistogram() { 1295 static EnumerationHistogram& featureObserverHistogram() {
1297 DEFINE_STATIC_LOCAL( 1296 DEFINE_STATIC_LOCAL(
1298 EnumerationHistogram, histogram, 1297 EnumerationHistogram, histogram,
1299 ("WebCore.FeatureObserver", UseCounter::NumberOfFeatures)); 1298 ("WebCore.FeatureObserver", UseCounter::NumberOfFeatures));
1300 return histogram; 1299 return histogram;
1301 } 1300 }
1302 1301
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
1345 } 1344 }
1346 } 1345 }
1347 1346
1348 if (needsPagesMeasuredUpdate) 1347 if (needsPagesMeasuredUpdate)
1349 cssPropertiesHistogram.count(totalPagesMeasuredCSSSampleId()); 1348 cssPropertiesHistogram.count(totalPagesMeasuredCSSSampleId());
1350 1349
1351 m_CSSBits.clearAll(); 1350 m_CSSBits.clearAll();
1352 } 1351 }
1353 1352
1354 } // namespace blink 1353 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/UseCounterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698