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

Unified Diff: android_webview/tools/system_webview_shell/apk/src/org/chromium/webview_shell/TelemetryActivity.java

Issue 2380053002: aw: Change telemetry traces to collect better startup time stats. (Closed)
Patch Set: Created 4 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: android_webview/tools/system_webview_shell/apk/src/org/chromium/webview_shell/TelemetryActivity.java
diff --git a/android_webview/tools/system_webview_shell/apk/src/org/chromium/webview_shell/TelemetryActivity.java b/android_webview/tools/system_webview_shell/apk/src/org/chromium/webview_shell/TelemetryActivity.java
index ec09abc4612761cfe7f04aa5af72f4e0232d4f1d..d6eb5c999654c2e6b6bfeb17b1577fa85864ffa0 100644
--- a/android_webview/tools/system_webview_shell/apk/src/org/chromium/webview_shell/TelemetryActivity.java
+++ b/android_webview/tools/system_webview_shell/apk/src/org/chromium/webview_shell/TelemetryActivity.java
@@ -18,6 +18,8 @@ import android.webkit.WebViewClient;
public class TelemetryActivity extends Activity {
static final String DEFAULT_START_UP_TRACE_TAG = "WebViewStartupInterval";
static final String DEFAULT_LOAD_URL_TRACE_TAG = "WebViewBlankUrlLoadInterval";
+ static final String DEFAULT_START_UP_AND_LOAD_URL_TRACE_TAG =
+ "WebViewStartupAndLoadBlankUrlInterval";
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -28,11 +30,15 @@ public class TelemetryActivity extends Activity {
Intent intent = getIntent();
final String startUpTraceTag = intent.getStringExtra("WebViewStartUpTraceTag");
final String loadUrlTraceTag = intent.getStringExtra("WebViewLoadUrlTraceTag");
+ final String startUpAndLoadUrlTraceTag =
+ intent.getStringExtra("WebViewStartUpAndLoadUrlTraceTag");
+ Trace.beginSection(startUpTraceTag == null ? DEFAULT_START_UP_AND_LOAD_URL_TRACE_TAG
+ : startUpAndLoadUrlTraceTag);
Trace.beginSection(startUpTraceTag == null ? DEFAULT_START_UP_TRACE_TAG : startUpTraceTag);
WebView webView = new WebView(this);
- Trace.endSection();
setContentView(webView);
+ Trace.endSection();
CookieManager.setAcceptFileSchemeCookies(true);
WebSettings settings = webView.getSettings();
@@ -56,6 +62,7 @@ public class TelemetryActivity extends Activity {
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
Trace.endSection();
+ Trace.endSection();
}
});
« 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