Speed Tracer Logging API

Correlating application-level user interactions with regions in the graph can be difficult, especially with applications that have a high level of activity. The Speed Tracer Logging API provides a means for you to insert markers throughout your application that will show up on the Speed Tracer timeline. The log messages are captured in the event trace tree and highlighted with an icon, so you can know exactly when the message was logged with respect to the other things going on in the browser.

Speed Tracer uses WebKit's console logging API to record the log in the stream of timeline data.


The following is the suggested usage for regular JS applications:

function log(msg) {
  var logger = window.console;
  if (logger && logger.markTimeline) {

The following is the suggested usage for GWT applications:

public static native void log(String msg) /*-{
  var logger = $wnd.console;
  if(logger && logger.markTimeline) {

Invocations of console.markTimeline() show up in timeline's Event Trace, annotated with a little blue info bubble , at the beginning of the highlighted "Log message":

The log message will also be a part of any Speed Traces you save to disk. A saved Speed Trace JSON record looks like the following:

  "data":{"message":"Building Widget A"},
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License.