OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 TogglePrettyPrint: "togglePrettyPrint", | 79 TogglePrettyPrint: "togglePrettyPrint", |
80 SetBreakpoint: "setBreakpoint", | 80 SetBreakpoint: "setBreakpoint", |
81 OpenSourceLink: "openSourceLink", | 81 OpenSourceLink: "openSourceLink", |
82 NetworkSort: "networkSort", | 82 NetworkSort: "networkSort", |
83 NetworkRequestSelected: "networkRequestSelected", | 83 NetworkRequestSelected: "networkRequestSelected", |
84 NetworkRequestTabSelected: "networkRequestTabSelected", | 84 NetworkRequestTabSelected: "networkRequestTabSelected", |
85 HeapSnapshotFilterChanged: "heapSnapshotFilterChanged" | 85 HeapSnapshotFilterChanged: "heapSnapshotFilterChanged" |
86 }; | 86 }; |
87 | 87 |
88 WebInspector.UserMetrics.prototype = { | 88 WebInspector.UserMetrics.prototype = { |
| 89 /** |
| 90 * @param {string} panelName |
| 91 */ |
89 panelShown: function(panelName) | 92 panelShown: function(panelName) |
90 { | 93 { |
91 InspectorFrontendHost.recordPanelShown(WebInspector.UserMetrics._PanelCo
des[panelName] || 0); | 94 var code = WebInspector.UserMetrics._PanelCodes[panelName] || 0; |
| 95 var size = Object.keys(WebInspector.UserMetrics._PanelCodes).length + 1; |
| 96 InspectorFrontendHost.recordEnumeratedHistogram("DevTools.PanelShown", c
ode, size); |
92 } | 97 } |
93 } | 98 } |
94 | 99 |
95 /** | 100 /** |
96 * @constructor | 101 * @constructor |
97 */ | 102 */ |
98 WebInspector.UserMetrics._Recorder = function(actionCode) | 103 WebInspector.UserMetrics._Recorder = function(actionCode) |
99 { | 104 { |
100 this._actionCode = actionCode; | 105 this._actionCode = actionCode; |
101 } | 106 } |
102 | 107 |
103 WebInspector.UserMetrics._Recorder.prototype = { | 108 WebInspector.UserMetrics._Recorder.prototype = { |
104 record: function() | 109 record: function() |
105 { | 110 { |
106 InspectorFrontendHost.recordActionTaken(this._actionCode); | 111 var size = Object.keys(WebInspector.UserMetrics._ActionCodes).length + 1
; |
| 112 InspectorFrontendHost.recordEnumeratedHistogram("DevTools.ActionTaken",
this._actionCode, size); |
107 } | 113 } |
108 } | 114 } |
109 | 115 |
110 WebInspector.userMetrics = new WebInspector.UserMetrics(); | 116 WebInspector.userMetrics = new WebInspector.UserMetrics(); |
OLD | NEW |