Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(404)

Unified Diff: telemetry/telemetry/page/cache_temperature.py

Issue 3013233002: Add a comment for 'ensure_diskcache' (Closed)
Patch Set: edit comment Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: telemetry/telemetry/page/cache_temperature.py
diff --git a/telemetry/telemetry/page/cache_temperature.py b/telemetry/telemetry/page/cache_temperature.py
index 1b134bf37d034278c96a2889b9df2bf6d5cd00ed..3ff81de5d8039e341fcf2722bb8dc168d0320641 100644
--- a/telemetry/telemetry/page/cache_temperature.py
+++ b/telemetry/telemetry/page/cache_temperature.py
@@ -63,6 +63,12 @@ def EnsurePageCacheTemperature(page, browser, previous_page=None):
if temperature == COLD:
if previous_page is None:
+ # DiskCache initialization is performed asynchronously on Chrome start-up.
+ # Ensure that DiskCache is initialized before starting the measurement to
+ # avoid performance skew.
+ # This is done by navigating to an inexistent URL and then wait for the
+ # navigation to complete.
+ # TODO(kouhei) Consider moving this logic to PageCyclerStory
with MarkTelemetryInternal(browser, 'ensure_diskcache'):
tab = browser.tabs[0]
tab.Navigate("http://does.not.exist")
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698