Profiler Keybindings (#1801)

* Added default new profiler keybinding. Exposed profiler.start and profiler.stop so they can be used with keybindings

* Changing where session state gets set

* Cleaning up unnecessary code
This commit is contained in:
Madeline MacDonald
2018-06-29 16:34:40 -07:00
committed by GitHub
parent 4f76f116ac
commit 1819036d7d
6 changed files with 72 additions and 10 deletions

View File

@@ -79,10 +79,7 @@ export class ProfilerStart extends Action {
public run(input: ProfilerInput): TPromise<boolean> {
this.enabled = false;
input.data.clear();
return TPromise.wrap(this._profilerService.startSession(input.id).then(() => {
input.state.change({ isRunning: true, isStopped: false, isPaused: false });
return true;
}));
return TPromise.wrap(this._profilerService.startSession(input.id));
}
}
@@ -131,10 +128,7 @@ export class ProfilerStop extends Action {
public run(input: ProfilerInput): TPromise<boolean> {
this.enabled = false;
return TPromise.wrap(this._profilerService.stopSession(input.id).then(() => {
input.state.change({ isStopped: true, isPaused: false, isRunning: false });
return true;
}));
return TPromise.wrap(this._profilerService.stopSession(input.id));
}
}