mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 808557 - Telemetry to measure the impact of UIC_startSearch synchronous query. r=mak
This commit is contained in:
parent
2ddf3ce5d1
commit
bf9a9fedb6
@ -8,6 +8,8 @@ Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "PlacesUtils",
|
||||
"resource://gre/modules/PlacesUtils.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "TelemetryStopwatch",
|
||||
"resource://gre/modules/TelemetryStopwatch.jsm");
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//// Constants
|
||||
@ -77,6 +79,9 @@ const kBrowserUrlbarAutofillPref = "autoFill";
|
||||
// Whether to search only typed entries.
|
||||
const kBrowserUrlbarAutofillTypedPref = "autoFill.typed";
|
||||
|
||||
// The Telemetry histogram for urlInlineComplete query on domain
|
||||
const DOMAIN_QUERY_TELEMETRY = "PLACES_AUTOCOMPLETE_URLINLINE_DOMAIN_QUERY_TIME_MS";
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//// Globals
|
||||
|
||||
@ -1391,7 +1396,11 @@ urlInlineComplete.prototype = {
|
||||
if (lastSlashIndex == -1) {
|
||||
var hasDomainResult = false;
|
||||
var domain, untrimmedDomain;
|
||||
TelemetryStopwatch.start(DOMAIN_QUERY_TELEMETRY);
|
||||
try {
|
||||
// Execute the query synchronously.
|
||||
// This is by design, to avoid race conditions between the
|
||||
// user typing and the connection searching for the result.
|
||||
hasDomainResult = query.executeStep();
|
||||
if (hasDomainResult) {
|
||||
domain = query.getString(0);
|
||||
@ -1400,6 +1409,7 @@ urlInlineComplete.prototype = {
|
||||
} finally {
|
||||
query.reset();
|
||||
}
|
||||
TelemetryStopwatch.finish(DOMAIN_QUERY_TELEMETRY);
|
||||
|
||||
if (hasDomainResult) {
|
||||
// We got a match for a domain, we can add it immediately.
|
||||
|
@ -1833,6 +1833,13 @@
|
||||
"n_buckets": 10,
|
||||
"description": "PLACES: Time for first autocomplete result if > 50ms (ms)"
|
||||
},
|
||||
"PLACES_AUTOCOMPLETE_URLINLINE_DOMAIN_QUERY_TIME_MS": {
|
||||
"kind": "exponential",
|
||||
"low": 50,
|
||||
"high": 2000,
|
||||
"n_buckets": 10,
|
||||
"description": "PLACES: Duration of the domain query for the url inline autocompletion (ms)"
|
||||
},
|
||||
"PLACES_IDLE_FRECENCY_DECAY_TIME_MS": {
|
||||
"kind": "exponential",
|
||||
"low": 50,
|
||||
|
Loading…
Reference in New Issue
Block a user