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

Side by Side Diff: tools/metrics/histograms/update_use_counter_feature_enum.py

Issue 2815773004: Fix update_histogram_enum.py when UpdateHistogramEnum is called. (Closed)
Patch Set: another callsite Created 3 years, 8 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 | « tools/metrics/histograms/update_histogram_enum.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Scans the Chromium source of UseCounter, formats the Feature enum for 6 """Scans the Chromium source of UseCounter, formats the Feature enum for
7 histograms.xml and merges it. This script can also generate a python code 7 histograms.xml and merges it. This script can also generate a python code
8 snippet to put in uma.py of Chromium Dashboard. Make sure that you review the 8 snippet to put in uma.py of Chromium Dashboard. Make sure that you review the
9 output for correctness. 9 output for correctness.
10 """ 10 """
(...skipping 20 matching lines...) Expand all
31 'Chromium dashboard developed at ' 31 'Chromium dashboard developed at '
32 'https://github.com/GoogleChrome/chromium-dashboard') 32 'https://github.com/GoogleChrome/chromium-dashboard')
33 options, args = parser.parse_args() 33 options, args = parser.parse_args()
34 34
35 source_path = 'third_party/WebKit/Source/core/frame/UseCounter.h' 35 source_path = 'third_party/WebKit/Source/core/frame/UseCounter.h'
36 36
37 START_MARKER = '^enum Feature : uint32_t {' 37 START_MARKER = '^enum Feature : uint32_t {'
38 END_MARKER = '^NumberOfFeatures' 38 END_MARKER = '^NumberOfFeatures'
39 39
40 if options.dashboard: 40 if options.dashboard:
41 enum_dict = ReadHistogramValues(source_path, START_MARKER, END_MARKER) 41 enum_dict, ignored = ReadHistogramValues(source_path, START_MARKER,
42 END_MARKER)
42 PrintEnumForDashboard(enum_dict) 43 PrintEnumForDashboard(enum_dict)
43 else: 44 else:
44 UpdateHistogramEnum( 45 UpdateHistogramEnum(
45 histogram_enum_name='FeatureObserver', 46 histogram_enum_name='FeatureObserver',
46 source_enum_path=source_path, 47 source_enum_path=source_path,
47 start_marker=START_MARKER, 48 start_marker=START_MARKER,
48 end_marker=END_MARKER) 49 end_marker=END_MARKER)
OLDNEW
« no previous file with comments | « tools/metrics/histograms/update_histogram_enum.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698