Difference between revisions of "UDC/What Gets Captured"

From Eclipsepedia

< UDC
Jump to: navigation, search
(Sample Data)
Line 133: Line 133:
 
+----------+---------+--------------------------+----------------------+------------------------------------------------+---------------+</pre>
 
+----------+---------+--------------------------+----------------------+------------------------------------------------+---------------+</pre>
  
=Views=
+
=Workbench, Perspectives, Views, and Editors (Workbench Parts)=
 +
Workbench usage information is captured by [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.epp/plugins/org.eclipse.epp.usagedata.gathering/src/org/eclipse/epp/usagedata/internal/gathering/monitors/PartUsageMonitor.java?view=markup&root=Technology_Project PartUsageMonitor.java].
 +
 
 +
This monitor installs a listener on all workbench windows (including windows that are subsequently opened); it records all events that pertain to views and editors.
 +
 
 +
For each bundle "event", the ''kind'' is "workbench", "perspective", "view" or "editor"; ''what'' is the "opened", "closed", "activated", or "deactivated", and ''description'' is the id (as it appears in the plugin.xml file) of the perspective, view, or editor that caused the event. The id and version of the bundle that owns the part that caused the event are also captured.
 +
 
 +
==Events==
 +
*'''opened''' - The workbench, perspective, view, or editor has been opened and added to the workbench;
 +
*'''closed''' - The workbench, perspective, view, or editor has been closed;
 +
*'''activated''' - The workbench, perspective, view, or editor has been "brought to the top", i.e. the user has brought the part into focus; and
 +
*'''deactivated''' - Another part has been activated (rendering the source of this event inactive, or out of focus).
 +
 
 +
In the case of workbench events, ''activated'' and ''deactivated'' events are created when the user brings Eclipse into or out of focus.
  
 
==Sample Data==
 
==Sample Data==

Revision as of 15:26, 22 September 2010

Contents

Overview

At a high-level, the Usage Data Collector (UDC) monitors what is being used and when (timestamp), including:

  • Runtime environment (operating system, host Java runtime, etc.)
  • Bundles
  • Commands accessed via keyboard shortcuts
  • Actions invoked via menus or toolbars
  • Perspective changes
  • View usage
  • Editor usage

The UDC uses a collection of "monitors" to gather information. These monitors are started when the UDC starts up; generally, they install observer hooks into the Eclipse framework.

Each usage data event is stored in a table that is transmitted to the Eclipse Foundation Server. Files are in CSV-format with the following columns:

  • what - What happened (i.e. the event), e.g. "activated", "started", "executed", ...
  • kind - The kind of thing that caused the event (i.e. the source), e.g. "view", "editor", "command", ...
  • bundleId - The name of the bundle that "owns" the thing that caused the event, e.g. "org.eclipse.ui.editors"
  • bundleVersion - The version of the bundle, e.g. "3.6.0.v20100520-0800"
  • description - Event-specific information, e.g. "org.eclipse.pde.ui.PDEPerspective"
  • time - Time of the event (millisecond clock value from the workstation)

FWIW, we recognized (too late) that what and kind are terrible names for what should probably be called event and source.

Runtime Environment

Every time Eclipse is started, the runtime environment is recorded by the UDC. This functionality is implemented by SystemInfoMonitor.java. This monitor does not install any hooks, it just grabs system information. Since this monitor gathers information every time Eclipse is started, the information that it gathers may be somewhat redundant. However, it should indicate changes in the runtime environment over time.

For all runtime environment "events", the kind is "sysinfo", what is the name of a property (see below), and description contains the value of the corresponding system property. No bundle id or version is captured.

Properties Captured

  • os - The operating system (result of calling Platform.getOS()), e.g. "linux";
  • arch - The system architecture (result of calling Platform.getOSArch()), e.g. "x86"
  • ws - The windowing system (result of calling Platform.getWS()), e.g. "gtk"
  • locale - Locale (result of calling Platform.getNL()), e.g. "en_CA"
  • processors - Number of available processors, e.g. "2"
  • System properties (result of calling System.getProperty(name))
    • java.runtime.name, e.g. "Java(TM) SE Runtime Environment"
    • java.runtime.version, e.g. "1.6.0_14-b08"
    • java.specification.name, e.g. "Java Platform API Specification"
    • java.specification.vendor, e.g. "Sun Microsystems Inc."
    • java.specification.version, e.g. "1.6"
    • java.vendor, e.g. "Sun Microsystems Inc."
    • java.version, e.g. "1.6.0_14"
    • java.vm, e.g. "mixed mode, sharing"
    • java.vm.name, e.g. "Java HotSpot(TM) Client VM"
    • java.vm.specification.name, e.g. "Java Virtual Machine Specification"
    • java.vm.specification.vendor, e.g. "Sun Microsystems Inc."
    • java.vm.specification.version, e.g. "1.0"
    • java.vm.vendor, e.g. "Sun Microsystems Inc."
    • java.vm.version, e.g. "14.0-b16"

Sample Data

+-------------------------------+---------+----------+---------------+------------------------------------+---------------+
| what                          | kind    | bundleId | bundleVersion | description                        | time          |
+-------------------------------+---------+----------+---------------+------------------------------------+---------------+
| os                            | sysinfo |          |               | win32                              | 1251868213235 | 
| arch                          | sysinfo |          |               | x86                                | 1251868213235 | 
| ws                            | sysinfo |          |               | win32                              | 1251868213235 | 
| locale                        | sysinfo |          |               | ja_JP                              | 1251868213235 | 
| processors                    | sysinfo |          |               | 2                                  | 1251868213235 | 
| java.runtime.name             | sysinfo |          |               | Java(TM) SE Runtime Environment    | 1251868213235 | 
| java.runtime.version          | sysinfo |          |               | 1.6.0_16-b01                       | 1251868213235 | 
| java.specification.name       | sysinfo |          |               | Java Platform API Specification    | 1251868213235 | 
| java.specification.vendor     | sysinfo |          |               | Sun Microsystems Inc.              | 1251868213235 | 
| java.specification.version    | sysinfo |          |               | 1.6                                | 1251868213235 | 
| java.vendor                   | sysinfo |          |               | Sun Microsystems Inc.              | 1251868213235 | 
| java.version                  | sysinfo |          |               | 1.6.0_16                           | 1251868213235 | 
| java.vm.info                  | sysinfo |          |               | mixed mode                         | 1251868213235 | 
| java.vm.name                  | sysinfo |          |               | Java HotSpot(TM) Client VM         | 1251868213235 | 
| java.vm.specification.name    | sysinfo |          |               | Java Virtual Machine Specification | 1251868213235 | 
| java.vm.specification.vendor  | sysinfo |          |               | Sun Microsystems Inc.              | 1251868213235 | 
| java.vm.specification.version | sysinfo |          |               | 1.0                                | 1251868213235 | 
| java.vm.vendor                | sysinfo |          |               | Sun Microsystems Inc.              | 1251868213235 | 
| java.vm.version               | sysinfo |          |               | 14.2-b01                           | 1251868213235 | 
+-------------------------------+---------+----------+---------------+------------------------------------+---------------+

Bundles

Bundle usage information is captured by BundleUsageMonitor.java.

This monitor installs a listener on the bundle context; it records all reported bundle-specific events. Since we have little control over the order in which our bundle starts, the first thing that this monitor does is get a list of all bundles that have previously been started and reports "started" events for each of them.

For each bundle "event", the kind is "bundle", what is the event (e.g. "started"; see below), and description is the symbolic name of the bundle. The bundle id and bundle version are also captured.

Bundle Events

  • "unknown";
  • "updated";
  • "unresolved";
  • "uninstalled";
  • "stopping";
  • "stopped";
  • "starting";
  • "resolved";
  • "lazy_activation";
  • "installed";
  • "started"

Sample Data

+---------+--------+--------------------------+-----------------------+--------------------------+---------------+
| what    | kind   | bundleId                 | bundleVersion         | description              | time          |
+---------+--------+--------------------------+-----------------------+--------------------------+---------------+
| started | bundle | org.eclipse.ui.workbench | 3.4.1.M20080827-0800a | org.eclipse.ui.workbench | 1226071982374 | 
| started | bundle | org.eclipse.ui.workbench | 3.4.1.M20080827-0800a | org.eclipse.ui.workbench | 1226510459343 | 
| started | bundle | org.eclipse.ui.workbench | 3.4.0.I20080606-1300  | org.eclipse.ui.workbench | 1230210072104 | 
| started | bundle | org.eclipse.ui.workbench | 3.4.1.M20080827-0800a | org.eclipse.ui.workbench | 1230258267279 | 
| started | bundle | org.eclipse.ui.workbench | 3.4.1.M20080827-0800a | org.eclipse.ui.workbench | 1230255193181 | 
| started | bundle | org.eclipse.ui.workbench | 3.4.0.I20080606-1300  | org.eclipse.ui.workbench | 1227296259989 | 
| started | bundle | org.eclipse.ui.workbench | 3.4.1.M20080827-0800a | org.eclipse.ui.workbench | 1230028059059 | 
| started | bundle | org.eclipse.ui.workbench | 3.4.1.M20080827-0800a | org.eclipse.ui.workbench | 1230268903466 | 
| started | bundle | org.eclipse.ui.workbench | 3.4.0.I20080606-1300  | org.eclipse.ui.workbench | 1230267531402 | 
| started | bundle | org.eclipse.ui.workbench | 3.4.0.I20080606-1300  | org.eclipse.ui.workbench | 1230341897970 | 
+---------+--------+--------------------------+-----------------------+--------------------------+---------------+

Commands

Sample Data

+----------+---------+--------------------------+----------------------+------------------------------------------------+---------------+
| what     | kind    | bundleId                 | bundleVersion        | description                                    | time          |
+----------+---------+--------------------------+----------------------+------------------------------------------------+---------------+
| executed | command | org.eclipse.ui           | 3.4.1.M20080910-0800 | org.eclipse.ui.views.showView                  | 1226071991766 | 
| executed | command | org.eclipse.ui           | 3.4.1.M20080910-0800 | org.eclipse.ui.views.showView                  | 1226071991766 | 
| executed | command | org.eclipse.ui           | 3.4.1.M20080910-0800 | org.eclipse.ui.file.exit                       | 1226072070530 | 
| executed | command | org.eclipse.ui           | 3.4.1.M20080910-0800 | org.eclipse.ui.edit.paste                      | 1226510493273 | 
| executed | command | org.eclipse.ui           | 3.4.1.M20080910-0800 | org.eclipse.ui.file.save                       | 1226510500230 | 
| executed | command | org.eclipse.ui           | 3.4.1.M20080910-0800 | org.eclipse.ui.edit.paste                      | 1226511077727 | 
| executed | command | org.eclipse.ui           | 3.4.1.M20080910-0800 | org.eclipse.ui.file.save                       | 1226511078850 | 
| executed | command | org.eclipse.jdt.debug.ui | 3.3.1.v20080730_r341 | org.eclipse.jdt.debug.ui.localJavaShortcut.run | 1226511085371 | 
| executed | command | org.eclipse.ui           | 3.4.1.M20080910-0800 | org.eclipse.ui.edit.selectAll                  | 1226511093295 | 
| executed | command | org.eclipse.ui           | 3.4.1.M20080910-0800 | org.eclipse.ui.edit.copy                       | 1226511094153 | 
+----------+---------+--------------------------+----------------------+------------------------------------------------+---------------+

Workbench, Perspectives, Views, and Editors (Workbench Parts)

Workbench usage information is captured by PartUsageMonitor.java.

This monitor installs a listener on all workbench windows (including windows that are subsequently opened); it records all events that pertain to views and editors.

For each bundle "event", the kind is "workbench", "perspective", "view" or "editor"; what is the "opened", "closed", "activated", or "deactivated", and description is the id (as it appears in the plugin.xml file) of the perspective, view, or editor that caused the event. The id and version of the bundle that owns the part that caused the event are also captured.

Events

  • opened - The workbench, perspective, view, or editor has been opened and added to the workbench;
  • closed - The workbench, perspective, view, or editor has been closed;
  • activated - The workbench, perspective, view, or editor has been "brought to the top", i.e. the user has brought the part into focus; and
  • deactivated - Another part has been activated (rendering the source of this event inactive, or out of focus).

In the case of workbench events, activated and deactivated events are created when the user brings Eclipse into or out of focus.

Sample Data

+-----------+--------+--------------------+---------------------------+------------------------------------------+---------------+
| what      | kind   | bundleId           | bundleVersion             | description                              | time          |
+-----------+--------+--------------------+---------------------------+------------------------------------------+---------------+
| activated | view   | org.eclipse.jdt.ui | 3.5.0.v20090604           | org.eclipse.jdt.ui.PackageExplorer       | 1251868261500 | 
| activated | view   | org.eclipse.jdt.ui | 3.5.0.v20090604           | org.eclipse.jdt.ui.PackageExplorer       | 1251868852688 | 
| activated | view   | org.eclipse.jdt.ui | 3.4.0.v20080603-2000      | org.eclipse.jdt.ui.PackageExplorer       | 1245484098185 | 
| activated | view   | org.eclipse.jdt.ui | 3.4.0.v20080603-2000      | org.eclipse.jdt.ui.PackageExplorer       | 1245488145004 | 
| activated | view   | org.eclipse.jdt.ui | 3.4.2.r342_v20090107-0800 | org.eclipse.jdt.ui.PackageExplorer       | 1240391410167 | 
| opened    | view   | org.eclipse.jdt.ui | 3.4.2.r342_v20090107-0800 | org.eclipse.jdt.ui.JavadocView           | 1240391524979 | 
| activated | view   | org.eclipse.jdt.ui | 3.4.2.r342_v20090107-0800 | org.eclipse.jdt.ui.JavadocView           | 1240391525026 | 
| activated | view   | org.eclipse.jdt.ui | 3.4.2.r342_v20090107-0800 | org.eclipse.jdt.ui.PackageExplorer       | 1240391655042 | 
| activated | view   | org.eclipse.jdt.ui | 3.4.2.r342_v20090107-0800 | org.eclipse.jdt.ui.PackageExplorer       | 1240391805729 | 
| activated | view   | org.eclipse.jdt.ui | 3.5.0.v20090604           | org.eclipse.jdt.ui.PackageExplorer       | 1253838158570 | 
| closed    | view   | org.eclipse.jdt.ui | 3.5.0.v20090604           | org.eclipse.jdt.ui.PackageExplorer       | 1253838160301 | 
| activated | editor | org.eclipse.jdt.ui | 3.4.0.v20080603-2000      | org.eclipse.jdt.ui.CompilationUnitEditor | 1245484104487 | 
| activated | editor | org.eclipse.jdt.ui | 3.4.0.v20080603-2000      | org.eclipse.jdt.ui.CompilationUnitEditor | 1245484107077 | 
| activated | editor | org.eclipse.jdt.ui | 3.4.0.v20080603-2000      | org.eclipse.jdt.ui.CompilationUnitEditor | 1245484107607 | 
| closed    | editor | org.eclipse.jdt.ui | 3.4.0.v20080603-2000      | org.eclipse.jdt.ui.CompilationUnitEditor | 1245484107607 | 
| opened    | editor | org.eclipse.jdt.ui | 3.4.0.v20080603-2000      | org.eclipse.jdt.ui.CompilationUnitEditor | 1245484108824 | 
| activated | editor | org.eclipse.jdt.ui | 3.4.0.v20080603-2000      | org.eclipse.jdt.ui.CompilationUnitEditor | 1245484108886 |  
+-----------+--------+--------------------+---------------------------+------------------------------------------+---------------+