mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1155272 - Add Telemetry probes for time to send a ping. r=vladan
This commit is contained in:
parent
fa6e3cc245
commit
33af347ab0
@ -4388,6 +4388,14 @@
|
||||
"n_values": 30,
|
||||
"description": "Number of telemetry pings evicted at startup"
|
||||
},
|
||||
"TELEMETRY_COMPRESS": {
|
||||
"expires_in_version": "never",
|
||||
"kind": "exponential",
|
||||
"high": "3000",
|
||||
"n_buckets": 10,
|
||||
"extended_statistics_ok": true,
|
||||
"description": "Time taken to compress telemetry object (ms)"
|
||||
},
|
||||
"TELEMETRY_PING": {
|
||||
"expires_in_version": "never",
|
||||
"kind": "exponential",
|
||||
@ -4396,6 +4404,22 @@
|
||||
"extended_statistics_ok": true,
|
||||
"description": "Time taken to submit telemetry info (ms)"
|
||||
},
|
||||
"TELEMETRY_SEND" : {
|
||||
"expires_in_version": "never",
|
||||
"kind": "exponential",
|
||||
"high": "3000",
|
||||
"n_buckets": 10,
|
||||
"extended_statistics_ok": true,
|
||||
"description": "Time to send the compressed string to the Telemetry servers and get a reply back (ms)"
|
||||
},
|
||||
"TELEMETRY_STRINGIFY" : {
|
||||
"expires_in_version": "never",
|
||||
"kind": "exponential",
|
||||
"high": "3000",
|
||||
"n_buckets": 10,
|
||||
"extended_statistics_ok": true,
|
||||
"description": "Time to stringify telemetry object (ms)"
|
||||
},
|
||||
"TELEMETRY_SUCCESS": {
|
||||
"expires_in_version": "never",
|
||||
"kind": "boolean",
|
||||
|
@ -790,6 +790,7 @@ let Impl = {
|
||||
onPingRequestFinished: function(success, startTime, ping, isPersisted) {
|
||||
this._log.trace("onPingRequestFinished - success: " + success + ", persisted: " + isPersisted);
|
||||
|
||||
Telemetry.getHistogramById("TELEMETRY_SEND").add(new Date() - startTime);
|
||||
let hping = Telemetry.getHistogramById("TELEMETRY_PING");
|
||||
let hsuccess = Telemetry.getHistogramById("TELEMETRY_SUCCESS");
|
||||
|
||||
@ -923,11 +924,16 @@ let Impl = {
|
||||
let converter = Cc["@mozilla.org/intl/scriptableunicodeconverter"]
|
||||
.createInstance(Ci.nsIScriptableUnicodeConverter);
|
||||
converter.charset = "UTF-8";
|
||||
startTime = new Date();
|
||||
let utf8Payload = converter.ConvertFromUnicode(JSON.stringify(networkPayload));
|
||||
utf8Payload += converter.Finish();
|
||||
Telemetry.getHistogramById("TELEMETRY_STRINGIFY").add(new Date() - startTime);
|
||||
let payloadStream = Cc["@mozilla.org/io/string-input-stream;1"]
|
||||
.createInstance(Ci.nsIStringInputStream);
|
||||
startTime = new Date();
|
||||
payloadStream.data = this.gzipCompressString(utf8Payload);
|
||||
Telemetry.getHistogramById("TELEMETRY_COMPRESS").add(new Date() - startTime);
|
||||
startTime = new Date();
|
||||
request.send(payloadStream);
|
||||
|
||||
return deferred.promise;
|
||||
|
Loading…
Reference in New Issue
Block a user