mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 810454: Replaces A/B test for cookie db readahead with always-enabled readahead. r=ehsan
--HG-- extra : rebase_source : 0ac433d97270b98a0d89c7eb68bdd3b9fa149e71
This commit is contained in:
parent
decd2dd5c1
commit
62c87cf91b
@ -781,23 +781,19 @@ nsCookieService::TryInitDB(bool aRecreateDB)
|
||||
NS_ENSURE_SUCCESS(rv, RESULT_FAILURE);
|
||||
}
|
||||
|
||||
Telemetry::ID histID;
|
||||
TimeStamp start = TimeStamp::Now();
|
||||
// rand() is being used here as a poor-man's solution for a/b testing
|
||||
if (rand() % 2) {
|
||||
histID = Telemetry::MOZ_SQLITE_COOKIES_OPEN_READAHEAD_MS;
|
||||
// This block provides scope for the Telemetry AutoTimer
|
||||
{
|
||||
Telemetry::AutoTimer<Telemetry::MOZ_SQLITE_COOKIES_OPEN_READAHEAD_MS>
|
||||
telemetry;
|
||||
ReadAheadFile(mDefaultDBState->cookieFile);
|
||||
} else {
|
||||
histID = Telemetry::MOZ_SQLITE_COOKIES_OPEN_MS;
|
||||
}
|
||||
|
||||
// open a connection to the cookie database, and only cache our connection
|
||||
// and statements upon success. The connection is opened unshared to eliminate
|
||||
// cache contention between the main and background threads.
|
||||
rv = mStorageService->OpenUnsharedDatabase(mDefaultDBState->cookieFile,
|
||||
getter_AddRefs(mDefaultDBState->dbConn));
|
||||
NS_ENSURE_SUCCESS(rv, RESULT_RETRY);
|
||||
Telemetry::AccumulateDelta_impl<Telemetry::Millisecond>::compute(histID, start);
|
||||
// open a connection to the cookie database, and only cache our connection
|
||||
// and statements upon success. The connection is opened unshared to eliminate
|
||||
// cache contention between the main and background threads.
|
||||
rv = mStorageService->OpenUnsharedDatabase(mDefaultDBState->cookieFile,
|
||||
getter_AddRefs(mDefaultDBState->dbConn));
|
||||
NS_ENSURE_SUCCESS(rv, RESULT_RETRY);
|
||||
}
|
||||
|
||||
// Set up our listeners.
|
||||
mDefaultDBState->insertListener = new InsertCookieDBListener(mDefaultDBState);
|
||||
|
@ -1698,13 +1698,6 @@
|
||||
"extended_statistics_ok": true,
|
||||
"description": "Time spent on SQLite read() (ms)"
|
||||
},
|
||||
"MOZ_SQLITE_COOKIES_OPEN_MS": {
|
||||
"kind": "exponential",
|
||||
"high": "3000",
|
||||
"n_buckets": 10,
|
||||
"extended_statistics_ok": true,
|
||||
"description": "Time spent on cookie DB open (ms)"
|
||||
},
|
||||
"MOZ_SQLITE_COOKIES_OPEN_READAHEAD_MS": {
|
||||
"kind": "exponential",
|
||||
"high": "3000",
|
||||
|
Loading…
Reference in New Issue
Block a user