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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileView.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 | « no previous file | third_party/WebKit/Source/devtools/front_end/sdk/CPUProfilerModel.js » ('j') | 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) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 var cpuProfilerModel = UI.context.flavor(SDK.CPUProfilerModel); 192 var cpuProfilerModel = UI.context.flavor(SDK.CPUProfilerModel);
193 if (this.profileBeingRecorded() || !cpuProfilerModel) 193 if (this.profileBeingRecorded() || !cpuProfilerModel)
194 return; 194 return;
195 var profile = new Profiler.CPUProfileHeader(cpuProfilerModel.target(), this) ; 195 var profile = new Profiler.CPUProfileHeader(cpuProfilerModel.target(), this) ;
196 this.setProfileBeingRecorded(profile); 196 this.setProfileBeingRecorded(profile);
197 SDK.targetManager.suspendAllTargets(); 197 SDK.targetManager.suspendAllTargets();
198 this.addProfile(profile); 198 this.addProfile(profile);
199 profile.updateStatus(Common.UIString('Recording\u2026')); 199 profile.updateStatus(Common.UIString('Recording\u2026'));
200 this._recording = true; 200 this._recording = true;
201 cpuProfilerModel.startRecording(); 201 cpuProfilerModel.startRecording();
202 Host.userMetrics.actionTaken(Host.UserMetrics.Action.ProfilesCPUProfileTaken );
202 } 203 }
203 204
204 stopRecordingProfile() { 205 stopRecordingProfile() {
205 this._recording = false; 206 this._recording = false;
206 if (!this.profileBeingRecorded() || !this.profileBeingRecorded().target()) 207 if (!this.profileBeingRecorded() || !this.profileBeingRecorded().target())
207 return; 208 return;
208 209
209 var recordedProfile; 210 var recordedProfile;
210 211
211 /** 212 /**
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 * @param {!SDK.CPUProfileNode} node 460 * @param {!SDK.CPUProfileNode} node
460 */ 461 */
461 constructor(depth, duration, startTime, selfTime, node) { 462 constructor(depth, duration, startTime, selfTime, node) {
462 this.depth = depth; 463 this.depth = depth;
463 this.duration = duration; 464 this.duration = duration;
464 this.startTime = startTime; 465 this.startTime = startTime;
465 this.selfTime = selfTime; 466 this.selfTime = selfTime;
466 this.node = node; 467 this.node = node;
467 } 468 }
468 }; 469 };
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/sdk/CPUProfilerModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698