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

Unified Diff: tools/metrics/actions/extract_actions.py

Issue 23876026: Add UMA stats for how often we get a 200 for a byte-range request for NPAPI plugins. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: tools/metrics/actions/extract_actions.py
===================================================================
--- tools/metrics/actions/extract_actions.py (revision 223113)
+++ tools/metrics/actions/extract_actions.py (working copy)
@@ -174,6 +174,8 @@
actions.add('PDF.FitToWidthButton')
actions.add('PDF.LoadFailure')
actions.add('PDF.LoadSuccess')
+ actions.add('PDF.SaveButton')
+ actions.add('PDF.PrintButton')
Ilya Sherman 2013/09/14 03:07:30 nit: Please alphabetize (I know the list is alread
jam 2013/09/15 21:58:14 Done.
actions.add('PDF.PreviewDocumentLoadFailure')
actions.add('PDF.ZoomFromBrowser')
actions.add('PDF.ZoomOutButton')
@@ -477,12 +479,18 @@
# We look for the ViewHostMsg_UserMetricsRecordAction constructor.
# This should be on one line.
action_re = re.compile(
- r'[^a-zA-Z]RenderThread::RecordUserMetrics\("([^"]*)')
+ r'[^a-zA-Z]RenderThread::Get\(\)->RecordUserMetrics\("([^"]*)')
+ action_re2 = re.compile(
+ r'[^a-zA-Z]RenderThreadImpl::current\(\)->RecordUserMetrics\("([^"]*)')
Ilya Sherman 2013/09/14 03:07:30 Hmm, why doesn't the RenderThread class use the Us
jam 2013/09/15 21:58:14 UserMetricsAction is used in the browser process,
Ilya Sherman 2013/09/16 19:50:03 Yes, I see that that's currently the case. My que
line_number = 0
Ilya Sherman 2013/09/14 03:07:30 As long as you're editing nearby code, let's get r
jam 2013/09/15 21:58:14 Done.
for line in open(path):
match = action_re.search(line)
- if match: # Plain call to RecordAction
+ if match: # Call to RecordUserMetrics through Content API
actions.add(match.group(1))
+ continue
+ match = action_re2.search(line)
+ if match: # Call to RecordUserMetrics inside Content
+ actions.add(match.group(1))
def AddLiteralActions(actions):
"""Add literal actions specified via calls to UserMetrics functions.
« tools/metrics/actions/chromeactions.txt ('K') | « tools/metrics/actions/chromeactions.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698