Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Orion/Metrics"
(initial) |
m |
||
Line 19: | Line 19: | ||
== logTiming(timingCategory, timingVar, timingValue, timingLabel) == | == logTiming(timingCategory, timingVar, timingValue, timingLabel) == | ||
− | This is similar to log event, but is for recording timings. Timings to be logged should be explicitly measured (ie.- use newDate().getTime() to record the start and end times of a scenario | + | This is similar to log event, but is for recording timings. Timings to be logged should be explicitly measured (ie.- use newDate().getTime() to record the start and end times of a scenario and then subtract them to determine the interval). timingValue should be in milliseconds. |
− | The base set of category/var groups that | + | The base set of category/var groups that currently exists: |
'''Category/Var''' | '''Category/Var''' |
Revision as of 16:39, 1 December 2014
orion/metrics is the place for logging runtime events and timings to be consumed by an analytics engine. The API follows:
logEvent(category, action, label, value)
The parameters are essentially categorizations of the event progressing from least- to most-specific. The first three parameters are strings, and the fourth (optional) parameter is a number.
A base set of category/action groups has been established (listed below). New kinds of events to be logged should try to fit into an existing group when possible in order to keep the set of namespaces under control. If there really isn't a good place for your new event in the current set of groups then a new category and/or action can be defined (and please update the list below).
Category/Action:
- command/invoke
- contentAssist/activate
- contentAssist/apply
- editor/action
- editor/open
- help/open
- preferenceChange
- shell/invoke
logTiming(timingCategory, timingVar, timingValue, timingLabel)
This is similar to log event, but is for recording timings. Timings to be logged should be explicitly measured (ie.- use newDate().getTime() to record the start and end times of a scenario and then subtract them to determine the interval). timingValue should be in milliseconds.
The base set of category/var groups that currently exists:
Category/Var
- page/complete
- page/interactive