mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1122172 - Typo in PerformanceController.getLocalElapsedTime: function is only accessed, not called, r=jsantell
This commit is contained in:
parent
1f4c79d386
commit
6d8bbd5edc
@ -207,11 +207,11 @@ let PerformanceController = {
|
||||
* when the front has started to record.
|
||||
*/
|
||||
startRecording: Task.async(function *() {
|
||||
let model = this.createNewRecording();
|
||||
this.setCurrentRecording(model);
|
||||
yield model.startRecording();
|
||||
let recording = this.createNewRecording();
|
||||
this.setCurrentRecording(recording);
|
||||
yield recording.startRecording();
|
||||
|
||||
this.emit(EVENTS.RECORDING_STARTED, model);
|
||||
this.emit(EVENTS.RECORDING_STARTED, recording);
|
||||
}),
|
||||
|
||||
/**
|
||||
@ -219,7 +219,7 @@ let PerformanceController = {
|
||||
* when the front has stopped recording.
|
||||
*/
|
||||
stopRecording: Task.async(function *() {
|
||||
let recording = this._getLatest();
|
||||
let recording = this._getLatestRecording();
|
||||
yield recording.stopRecording();
|
||||
|
||||
this.emit(EVENTS.RECORDING_STOPPED, recording);
|
||||
@ -247,28 +247,33 @@ let PerformanceController = {
|
||||
* The file to import the data from.
|
||||
*/
|
||||
importRecording: Task.async(function*(_, file) {
|
||||
let model = this.createNewRecording();
|
||||
yield model.importRecording(file);
|
||||
let recording = this.createNewRecording();
|
||||
yield recording.importRecording(file);
|
||||
|
||||
this.emit(EVENTS.RECORDING_IMPORTED, model.getAllData(), model);
|
||||
this.emit(EVENTS.RECORDING_IMPORTED, recording.getAllData(), recording);
|
||||
}),
|
||||
|
||||
/**
|
||||
* Creates a new RecordingModel, fires events and stores it
|
||||
* internally in the controller.
|
||||
*
|
||||
* @return RecordingModel
|
||||
* The newly created recording model.
|
||||
*/
|
||||
createNewRecording: function () {
|
||||
let model = new RecordingModel({
|
||||
let recording = new RecordingModel({
|
||||
front: gFront,
|
||||
performance: performance
|
||||
});
|
||||
this._recordings.push(model);
|
||||
this.emit(EVENTS.RECORDING_CREATED, model);
|
||||
return model;
|
||||
this._recordings.push(recording);
|
||||
|
||||
this.emit(EVENTS.RECORDING_CREATED, recording);
|
||||
return recording;
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the active RecordingModel to `recording`.
|
||||
* Sets the currently active RecordingModel.
|
||||
* @param RecordingModel recording
|
||||
*/
|
||||
setCurrentRecording: function (recording) {
|
||||
if (this._currentRecording !== recording) {
|
||||
@ -278,78 +283,18 @@ let PerformanceController = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Return the current active RecordingModel.
|
||||
* Gets the currently active RecordingModel.
|
||||
* @return RecordingModel
|
||||
*/
|
||||
getCurrentRecording: function () {
|
||||
return this._currentRecording;
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the amount of time elapsed locally after starting a recording.
|
||||
* Get most recently added recording that was triggered manually (via UI).
|
||||
* @return RecordingModel
|
||||
*/
|
||||
getLocalElapsedTime: function () {
|
||||
return this.getCurrentRecording().getLocalElapsedTime;
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the time interval for the current recording.
|
||||
* @return object
|
||||
*/
|
||||
getInterval: function() {
|
||||
return this.getCurrentRecording().getInterval();
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the accumulated markers in the current recording.
|
||||
* @return array
|
||||
*/
|
||||
getMarkers: function() {
|
||||
return this.getCurrentRecording().getMarkers();
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the accumulated stack frames in the current recording.
|
||||
* @return array
|
||||
*/
|
||||
getFrames: function() {
|
||||
return this.getCurrentRecording().getFrames();
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the accumulated memory measurements in this recording.
|
||||
* @return array
|
||||
*/
|
||||
getMemory: function() {
|
||||
return this.getCurrentRecording().getMemory();
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the accumulated refresh driver ticks in this recording.
|
||||
* @return array
|
||||
*/
|
||||
getTicks: function() {
|
||||
return this.getCurrentRecording().getTicks();
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets the profiler data in this recording.
|
||||
* @return array
|
||||
*/
|
||||
getProfilerData: function() {
|
||||
return this.getCurrentRecording().getProfilerData();
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets all the data in this recording.
|
||||
*/
|
||||
getAllData: function() {
|
||||
return this.getCurrentRecording().getAllData();
|
||||
},
|
||||
|
||||
/**
|
||||
* Get most recently added profile that was triggered manually (via UI)
|
||||
*/
|
||||
_getLatest: function () {
|
||||
_getLatestRecording: function () {
|
||||
for (let i = this._recordings.length - 1; i >= 0; i--) {
|
||||
return this._recordings[i];
|
||||
}
|
||||
@ -365,8 +310,8 @@ let PerformanceController = {
|
||||
},
|
||||
|
||||
/**
|
||||
* Fired from RecordingsView, we listen on the PerformanceController
|
||||
* so we can set it here and re-emit on the controller, where all views can listen.
|
||||
* Fired from RecordingsView, we listen on the PerformanceController so we can
|
||||
* set it here and re-emit on the controller, where all views can listen.
|
||||
*/
|
||||
_onRecordingSelectFromView: function (_, recording) {
|
||||
this.setCurrentRecording(recording);
|
||||
|
@ -9,7 +9,7 @@ function spawnTest () {
|
||||
let { EVENTS, PerformanceController, FlameGraphView } = panel.panelWin;
|
||||
|
||||
yield startRecording(panel);
|
||||
yield waitUntil(() => PerformanceController.getMarkers().length);
|
||||
yield waitUntil(() => PerformanceController.getCurrentRecording().getMarkers().length);
|
||||
|
||||
let rendered = once(FlameGraphView, EVENTS.FLAMEGRAPH_RENDERED);
|
||||
yield stopRecording(panel);
|
||||
|
@ -9,7 +9,7 @@ function spawnTest () {
|
||||
let { EVENTS, PerformanceController, WaterfallView } = panel.panelWin;
|
||||
|
||||
yield startRecording(panel);
|
||||
yield waitUntil(() => PerformanceController.getMarkers().length);
|
||||
yield waitUntil(() => PerformanceController.getCurrentRecording().getMarkers().length);
|
||||
|
||||
let rendered = once(WaterfallView, EVENTS.WATERFALL_RENDERED);
|
||||
yield stopRecording(panel);
|
||||
|
@ -14,7 +14,7 @@ let test = Task.async(function*() {
|
||||
|
||||
// Verify original recording.
|
||||
|
||||
let originalData = PerformanceController.getAllData();
|
||||
let originalData = PerformanceController.getCurrentRecording().getAllData();
|
||||
ok(originalData, "The original recording is not empty.");
|
||||
|
||||
// Save recording.
|
||||
@ -42,7 +42,7 @@ let test = Task.async(function*() {
|
||||
|
||||
// Verify imported recording.
|
||||
|
||||
let importedData = PerformanceController.getAllData();
|
||||
let importedData = PerformanceController.getCurrentRecording().getAllData();
|
||||
|
||||
is(importedData.startTime, originalData.startTime,
|
||||
"The impored data is identical to the original data (1).");
|
||||
|
@ -14,7 +14,7 @@ let test = Task.async(function*() {
|
||||
yield stopRecording(panel);
|
||||
|
||||
// Get data from the current profiler
|
||||
let data = PerformanceController.getAllData();
|
||||
let data = PerformanceController.getCurrentRecording().getAllData();
|
||||
|
||||
// Create a structure from the data that mimics the old profiler's data.
|
||||
// Different name for `ticks`, different way of storing time,
|
||||
@ -46,7 +46,7 @@ let test = Task.async(function*() {
|
||||
|
||||
// Verify imported recording.
|
||||
|
||||
let importedData = PerformanceController.getAllData();
|
||||
let importedData = PerformanceController.getCurrentRecording().getAllData();
|
||||
|
||||
is(importedData.startTime, data.startTime,
|
||||
"The imported legacy data was successfully converted for the current tool (1).");
|
||||
|
@ -73,7 +73,8 @@ let CallTreeView = {
|
||||
_onRangeChange: function (_, params) {
|
||||
// When a range is cleared, we'll have no beginAt/endAt data,
|
||||
// so the rebuild will just render all the data again.
|
||||
let profilerData = PerformanceController.getProfilerData();
|
||||
let recording = PerformanceController.getCurrentRecording();
|
||||
let profilerData = recording.getProfilerData();
|
||||
let { beginAt, endAt } = params || {};
|
||||
this.render(profilerData, beginAt, endAt);
|
||||
},
|
||||
|
@ -48,8 +48,9 @@ let WaterfallView = {
|
||||
* Method for handling all the set up for rendering a new waterfall.
|
||||
*/
|
||||
render: function() {
|
||||
let { startTime, endTime } = PerformanceController.getInterval();
|
||||
let markers = PerformanceController.getMarkers();
|
||||
let recording = PerformanceController.getCurrentRecording();
|
||||
let { startTime, endTime } = recording.getInterval();
|
||||
let markers = recording.getMarkers();
|
||||
|
||||
this.waterfall.setData(markers, startTime, startTime, endTime);
|
||||
|
||||
@ -84,12 +85,11 @@ let WaterfallView = {
|
||||
* updating the markers detail view.
|
||||
*/
|
||||
_onMarkerSelected: function (event, marker) {
|
||||
let recording = PerformanceController.getCurrentRecording();
|
||||
let frames = recording.getFrames();
|
||||
|
||||
if (event === "selected") {
|
||||
this.details.render({
|
||||
toolbox: gToolbox,
|
||||
marker: marker,
|
||||
frames: PerformanceController.getFrames()
|
||||
});
|
||||
this.details.render({ toolbox: gToolbox, marker, frames });
|
||||
}
|
||||
if (event === "unselected") {
|
||||
this.details.empty();
|
||||
|
@ -112,10 +112,11 @@ let OverviewView = {
|
||||
* The fps graph resolution. @see Graphs.jsm
|
||||
*/
|
||||
render: Task.async(function *(resolution) {
|
||||
let interval = PerformanceController.getInterval();
|
||||
let markers = PerformanceController.getMarkers();
|
||||
let memory = PerformanceController.getMemory();
|
||||
let timestamps = PerformanceController.getTicks();
|
||||
let recording = PerformanceController.getCurrentRecording();
|
||||
let interval = recording.getInterval();
|
||||
let markers = recording.getMarkers();
|
||||
let memory = recording.getMemory();
|
||||
let timestamps = recording.getTicks();
|
||||
|
||||
this.markersOverview.setData({ interval, markers });
|
||||
this.emit(EVENTS.MARKERS_GRAPH_RENDERED);
|
||||
|
Loading…
Reference in New Issue
Block a user