Timeline.json   [plain text]


{
    "domain": "Timeline",
    "description": "Timeline provides its clients with instrumentation records that are generated during the page runtime. Timeline instrumentation can be started and stopped using corresponding commands. While timeline is started, it is generating timeline event records.",
    "availability": "web",
    "types": [
        {
            "id": "EventType",
            "type": "string",
            "enum": [
                "EventDispatch",
                "ScheduleStyleRecalculation",
                "RecalculateStyles",
                "InvalidateLayout",
                "Layout",
                "Paint",
                "Composite",
                "RenderingFrame",
                "ScrollLayer",
                "TimerInstall",
                "TimerRemove",
                "TimerFire",
                "EvaluateScript",
                "TimeStamp",
                "Time",
                "TimeEnd",
                "XHRReadyStateChange",
                "XHRLoad",
                "FunctionCall",
                "ProbeSample",
                "ConsoleProfile",
                "GCEvent",
                "RequestAnimationFrame",
                "CancelAnimationFrame",
                "FireAnimationFrame",
                "WebSocketCreate",
                "WebSocketSendHandshakeRequest",
                "WebSocketReceiveHandshakeResponse",
                "WebSocketDestroy"
            ],
            "description": "Timeline record type."
        },
        {
            "id": "TimelineEvent",
            "type": "object",
            "properties": [
                { "name": "type", "$ref": "EventType", "description": "Event type." },
                { "name": "data", "type": "object", "description": "Event data." },
                { "name": "children", "type": "array", "optional": true, "items": { "$ref": "TimelineEvent" }, "description": "Nested records." }
            ],
            "description": "Timeline record contains information about the recorded activity."
        },
        {
            "id": "CPUProfileNodeAggregateCallInfo",
            "type": "object",
            "description": "Aggregate CPU Profile call info. Holds time information for all the calls that happened on a node.",
            "properties": [
                { "name": "callCount", "type": "number", "description": "Total number of calls." },
                { "name": "startTime", "type": "number", "description": "Start time for the first call." },
                { "name": "endTime", "type": "number", "description": "End time for the last call." },
                { "name": "totalTime", "type": "number", "description": "Total execution time for all calls combined." }
            ]
        },
        {
            "id": "CPUProfileNode",
            "type": "object",
            "description": "CPU Profile node. Holds callsite information, execution statistics and child nodes.",
            "properties": [
                { "name": "id", "type": "integer", "description": "Unique identifier for this call site." },
                { "name": "callInfo", "$ref": "CPUProfileNodeAggregateCallInfo", "description": "Aggregate info about all the calls that making up this node." },
                { "name": "functionName", "type": "string", "optional": true, "description": "Function name." },
                { "name": "url", "type": "string", "optional": true, "description": "URL." },
                { "name": "lineNumber", "type": "integer", "optional": true, "description": "Line number." },
                { "name": "columnNumber", "type": "integer", "optional": true, "description": "Column number." },
                { "name": "children", "type": "array", "items": { "$ref": "CPUProfileNode" }, "optional": true, "description": "Child nodes." }
            ]
        },
        {
            "id": "CPUProfile",
            "type": "object",
            "description": "Profile.",
            "properties": [
                { "name": "rootNodes", "type": "array", "items": { "$ref": "CPUProfileNode" }, "description": "Top level nodes in the stack." },
                { "name": "idleTime", "type": "number", "optional": true }
            ]
        }
    ],
    "commands": [
        {
            "name": "start",
            "parameters": [
                { "name": "maxCallStackDepth", "optional": true, "type": "integer", "description": "Samples JavaScript stack traces up to <code>maxCallStackDepth</code>, defaults to 5." }
            ],
            "description": "Starts capturing instrumentation events."
        },
        {
            "name": "stop",
            "description": "Stops capturing instrumentation events."
        }
    ],
    "events": [
        {
            "name": "eventRecorded",
            "parameters": [
                { "name": "record", "$ref": "TimelineEvent", "description": "Timeline event record data." }
            ],
            "description": "Fired for every instrumentation event while timeline is started."
        },
        {
            "name": "recordingStarted",
            "parameters": [
                { "name": "startTime", "type": "number", "description": "Start time of this new recording." }
            ],
            "description": "Fired when recording has started."
        },
        {
            "name": "recordingStopped",
            "parameters": [
                { "name": "endTime", "type": "number", "description": "End time of this recording." }
            ],
            "description": "Fired when recording has stopped."
        }
    ]
}