| |
- __builtin__.object
-
- TraceData
- TraceDataBuilder
- TraceDataPart
- exceptions.Exception(exceptions.BaseException)
-
- NonSerializableTraceData
class TraceData(__builtin__.object) |
|
Validates, parses, and serializes raw data.
NOTE: raw data must only include primitive objects!
By design, TraceData must contain only data that is BOTH json-serializable
to a file, AND restorable once again from that file into TraceData without
assistance from other classes.
Raw data can be one of three standard trace_event formats:
1. Trace container format: a json-parseable dict.
2. A json-parseable array: assumed to be chrome trace data.
3. A json-parseable array missing the final ']': assumed to be chrome trace
data. |
|
Methods defined here:
- GetEventsFor(self, part)
- HasEventsFor(self, part)
- Serialize(self, f, gzip_result=False)
- Serializes the trace result to a file-like object.
Always writes in the trace container format.
- __init__(self, raw_data=None)
- Creates TraceData from the given data.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- active_parts
- events_are_safely_mutable
- Returns true if the events in this value are completely sealed.
Some importers want to take complex fields out of the TraceData and add
them to the model, changing them subtly as they do so. If the TraceData
was constructed with data that is shared with something outside the trace
data, for instance a test harness, then this mutation is unexpected. But,
if the values are sealed, then mutating the events is a lot faster.
We know if events are sealed if the value came from a string, or if the
value came from a TraceDataBuilder.
- metadata_records
|
class TraceDataBuilder(__builtin__.object) |
|
TraceDataBuilder helps build up a trace from multiple trace agents.
TraceData is supposed to be immutable, but it is useful during recording to
have a mutable version. That is TraceDataBuilder. |
|
Methods defined here:
- AddEventsTo(self, part, events)
- Note: this won't work when called from multiple browsers.
Each browser's trace_event_impl zeros its timestamps when it writes them
out and doesn't write a timebase that can be used to re-sync them.
- AsData(self)
- HasEventsFor(self, part)
- __init__(self)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class TraceDataPart(__builtin__.object) |
|
TraceData can have a variety of events.
These are called "parts" and are accessed by the following fixed field names. |
|
Methods defined here:
- __init__(self, raw_field_name)
- __repr__(self)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- raw_field_name
| |