Skip to content

Class TraceFile

Definition

Namespace: StardewUI.Framework.Diagnostics
Assembly: StardewUI.dll

Format of a trace file compatible with speedscope.

public class TraceFile

Inheritance
Object ⇦ TraceFile

Members

Constructors

Name Description
TraceFile()

Properties

Name Description
CreationDate Exact date and time when the trace was started.
Exporter The name and version of the exporting mod (i.e. StardewUI).
Profiles List of profiles; each profile corresponds to a running thread.
SchemaUrl JSON schema URL; required by the Speedscope web tool.
Shared Shared trace data, containing the frames or slice names.

Methods

Name Description
CloseFrame(Int32) Appends an event that closes a frame previously opened with OpenFrame(string).
OpenFrame(string) Adds a new TraceFrame and TraceEvent to open it, and returns the frame index to be used subsequently with CloseFrame(Int32).

Details

Constructors

TraceFile()

public TraceFile();

Properties

CreationDate

Exact date and time when the trace was started.

public System.DateTime CreationDate { get; }
Property Value

DateTime


Exporter

The name and version of the exporting mod (i.e. StardewUI).

public string Exporter { get; set; }
Property Value

string


Profiles

List of profiles; each profile corresponds to a running thread.

public System.Collections.Generic.List<StardewUI.Framework.Diagnostics.TraceProfile> Profiles { get; }
Property Value

List<TraceProfile>


SchemaUrl

JSON schema URL; required by the Speedscope web tool.

public string SchemaUrl { get; }
Property Value

string


Shared

Shared trace data, containing the frames or slice names.

public StardewUI.Framework.Diagnostics.TraceShared Shared { get; }
Property Value

TraceShared


Methods

CloseFrame(int)

Appends an event that closes a frame previously opened with OpenFrame(string).

public void CloseFrame(int frame);
Parameters

frame   Int32
The index of the tracked frame in Frames.


OpenFrame(string)

Adds a new TraceFrame and TraceEvent to open it, and returns the frame index to be used subsequently with CloseFrame(Int32).

public int OpenFrame(string name);
Parameters

name   string
Name of the method or operation being traced.

Returns

Int32

The frame index, to be used with CloseFrame(Int32) when the operation completes.