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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/CPUProfilerModel.js

Issue 2748833002: DevTools: Move CPU profile taken UMA from model to UI (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileView.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 10 *
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 /** 85 /**
86 * @return {boolean} 86 * @return {boolean}
87 */ 87 */
88 isRecordingProfile() { 88 isRecordingProfile() {
89 return this._isRecording; 89 return this._isRecording;
90 } 90 }
91 91
92 startRecording() { 92 startRecording() {
93 this._isRecording = true; 93 this._isRecording = true;
94 Host.userMetrics.actionTaken(Host.UserMetrics.Action.ProfilesCPUProfileTaken );
95 var intervalUs = Common.moduleSetting('highResolutionCpuProfiling').get() ? 100 : 1000; 94 var intervalUs = Common.moduleSetting('highResolutionCpuProfiling').get() ? 100 : 1000;
96 this._profilerAgent.setSamplingInterval(intervalUs); 95 this._profilerAgent.setSamplingInterval(intervalUs);
97 this._profilerAgent.start(); 96 this._profilerAgent.start();
98 } 97 }
99 98
100 /** 99 /**
101 * @return {!Promise.<?Protocol.Profiler.Profile>} 100 * @return {!Promise.<?Protocol.Profiler.Profile>}
102 */ 101 */
103 stopRecording() { 102 stopRecording() {
104 /** 103 /**
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 SDK.SDKModel.register(SDK.CPUProfilerModel, SDK.Target.Capability.JS); 137 SDK.SDKModel.register(SDK.CPUProfilerModel, SDK.Target.Capability.JS);
139 138
140 /** @enum {symbol} */ 139 /** @enum {symbol} */
141 SDK.CPUProfilerModel.Events = { 140 SDK.CPUProfilerModel.Events = {
142 ConsoleProfileStarted: Symbol('ConsoleProfileStarted'), 141 ConsoleProfileStarted: Symbol('ConsoleProfileStarted'),
143 ConsoleProfileFinished: Symbol('ConsoleProfileFinished') 142 ConsoleProfileFinished: Symbol('ConsoleProfileFinished')
144 }; 143 };
145 144
146 /** @typedef {!{id: string, scriptLocation: !SDK.DebuggerModel.Location, title: (string|undefined), cpuProfile: (!Protocol.Profiler.Profile|undefined)}} */ 145 /** @typedef {!{id: string, scriptLocation: !SDK.DebuggerModel.Location, title: (string|undefined), cpuProfile: (!Protocol.Profiler.Profile|undefined)}} */
147 SDK.CPUProfilerModel.EventData; 146 SDK.CPUProfilerModel.EventData;
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698