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

Issue 12375006: Added UMA stats for extensions events on addListener. (Closed)

Created:
7 years, 9 months ago by calamity
Modified:
7 years, 5 months ago
CC:
chromium-reviews, Aaron Boodman, chromium-apps-reviews_chromium.org, chrome-apps-syd-review_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Added UMA stats for extensions events on addListener. json_schema_compiler used in order to provide compile time checks that enum value is added when an event is added to an API. BUG=

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+276 lines, -33 lines) Patch
M build/json_schema_bundle_compile.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M build/json_schema_compile.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/api/management/management_api.cc View 4 chunks +10 lines, -11 lines 0 comments Download
M chrome/browser/extensions/api/omnibox/omnibox_api.cc View 5 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/extensions/api/tab_capture/tab_capture_registry.cc View 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/extensions/browser_event_router.cc View 10 chunks +13 lines, -13 lines 0 comments Download
M chrome/browser/extensions/event_router.h View 3 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/extensions/event_router.cc View 5 chunks +11 lines, -0 lines 2 comments Download
A chrome/browser/extensions/extension_event_histogram_value.h View 1 chunk +181 lines, -0 lines 0 comments Download
M tools/json_schema_compiler/cpp_bundle_generator.py View 5 chunks +35 lines, -0 lines 0 comments Download
M tools/json_schema_compiler/model.py View 1 chunk +1 line, -0 lines 0 comments Download
M tools/json_schema_compiler/schema_util.py View 1 chunk +10 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
calamity
Hey, I'm not completely sure if recording the action where I do in event_router.cc is ...
7 years, 9 months ago (2013-02-28 00:02:50 UTC) #1
koz (OOO until 15th September)
7 years, 9 months ago (2013-03-13 01:00:27 UTC) #2
https://codereview.chromium.org/12375006/diff/1/chrome/browser/extensions/eve...
File chrome/browser/extensions/event_router.cc (right):

https://codereview.chromium.org/12375006/diff/1/chrome/browser/extensions/eve...
chrome/browser/extensions/event_router.cc:211:
RecordEventListenerAdded(event_name);
This might be trickier than it seems. Extensions / apps with lazy listeners will
repeatedly call AddEventListener() because they will be loaded and unloaded many
times. When a non-persistent extension is loaded it will add both a lazy
listener and a regular listener.

One way to solve this might be to distinguish between persistent and
non-persistent extensions and track listener adds for the former and lazy
listener adds for the later.

But even that has the problem that whenever the browser starts persistent
extensions will call AddEventListener() again and we will track it again. This
might not be too bad as we might reason that on average all persistent
extensions are going to be restarted roughly the same number of times, so that
can be factored out, but it's still quite dodgy...

We should clarify what we intend to find out from these statistics. If we want
to measure API usage there might be another way (eg: grep over the webstore)...

https://codereview.chromium.org/12375006/diff/1/chrome/browser/extensions/eve...
chrome/browser/extensions/event_router.cc:321: void
EventRouter::AddFilteredEventListener(const std::string& event_name,
You'll need to record filtered event listeners being added here, too.

Powered by Google App Engine
This is Rietveld 408576698