mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 907755 - Added telemetry probes to measure how long it takes to display a selected source text to the user; r=fitzgen
This commit is contained in:
parent
663f6dacb1
commit
82b30496bc
@ -36,6 +36,9 @@ const DEFAULT_EDITOR_CONFIG = {
|
||||
showOverviewRuler: true
|
||||
};
|
||||
|
||||
//For telemetry
|
||||
Cu.import("resource://gre/modules/Services.jsm")
|
||||
|
||||
/**
|
||||
* Object defining the debugger view components.
|
||||
*/
|
||||
@ -276,6 +279,13 @@ let DebuggerView = {
|
||||
if (this._editorSource.url == aSource.url && !aFlags.force) {
|
||||
return this._editorSource.promise;
|
||||
}
|
||||
let transportType = DebuggerController.client.localTransport
|
||||
? "_LOCAL"
|
||||
: "_REMOTE";
|
||||
//Telemetry probe
|
||||
let histogramId = "DEVTOOLS_DEBUGGER_DISPLAY_SOURCE" + transportType + "_MS";
|
||||
let histogram = Services.telemetry.getHistogramById(histogramId);
|
||||
let startTime = +new Date();
|
||||
|
||||
let deferred = promise.defer();
|
||||
|
||||
@ -296,6 +306,8 @@ let DebuggerView = {
|
||||
DebuggerView.Sources.selectedValue = aSource.url;
|
||||
DebuggerController.Breakpoints.updateEditorBreakpoints();
|
||||
|
||||
histogram.add(+new Date() - startTime);
|
||||
|
||||
// Resolve and notify that a source file was shown.
|
||||
window.emit(EVENTS.SOURCE_SHOWN, aSource);
|
||||
deferred.resolve([aSource, aText]);
|
||||
|
@ -3554,6 +3554,18 @@
|
||||
"n_buckets": "1000",
|
||||
"description": "The time (in milliseconds) that it took a 'detach' request to go round trip."
|
||||
},
|
||||
"DEVTOOLS_DEBUGGER_DISPLAY_SOURCE_LOCAL_MS": {
|
||||
"kind": "exponential",
|
||||
"high": "10000",
|
||||
"n_buckets": "1000",
|
||||
"description": "The time (in milliseconds) that it took to display a selected source to the user."
|
||||
},
|
||||
"DEVTOOLS_DEBUGGER_DISPLAY_SOURCE_REMOTE_MS":{
|
||||
"kind": "exponential",
|
||||
"high": "10000",
|
||||
"n_buckets": "1000",
|
||||
"description": "The time (in milliseconds) that it took to display a selected source to the user."
|
||||
},
|
||||
"WEBRTC_ICE_SUCCESS_RATE":{
|
||||
"kind": "boolean",
|
||||
"description": "The number of failed ICE Connections (0) vs. number of successful ICE connections (1)."
|
||||
|
@ -237,7 +237,7 @@ this.DebuggerClient = function DebuggerClient(aTransport)
|
||||
]);
|
||||
|
||||
this.request = this.request.bind(this);
|
||||
this.localTransport = (this._transport instanceof LocalDebuggerTransport);
|
||||
this.localTransport = this._transport.onOutputStreamReady === undefined;
|
||||
|
||||
/*
|
||||
* As the first thing on the connection, expect a greeting packet from
|
||||
|
Loading…
Reference in New Issue
Block a user