12 private readonly
long ticks;
29 public long Ticks => this.ticks;
54 Output.WriteEndElement();
65 Output.WriteAttributeString(
"ticks", this.ticks.ToString());
66 Output.WriteAttributeString(
"time", this.thread.ToTimeStr(
this.ticks,
TimeUnit));
68 if (!(Previous is
null))
70 Output.WriteAttributeString(
"elapsedTicks", (this.ticks - Previous.ticks).ToString());
71 Output.WriteAttributeString(
"elapsedTime", this.thread.ToTimeStr(
this.ticks - Previous.ticks,
TimeUnit));
81 StringBuilder Output = States.
GetBuilder(this.ticks);
82 Output.Append(this.thread.Key);
83 Output.Append(
" is ");
87 if (s.StartsWith(
"{") && s.EndsWith(
"}"))
92 Output.Append(s.Replace(
"\"",
"'"));
93 Output.AppendLine(
"\"");
Abstract base class for profiler events.
ProfilerEvent(long Ticks, ProfilerThread Thread)
Abstract base class for profiler events.
virtual void Accumulate(Accumulator Accumulator)
Accumulates the event.
virtual void ExportPlantUml(PlantUmlStates States)
Exports events to PlantUML.
abstract string EventType
Type of event.
virtual void ExportXmlAttributes(XmlWriter Output, ProfilerEvent Previous, TimeUnit TimeUnit)
Exports event attributes to XML.
abstract string PlantUmlState
PlantUML state representing event.
virtual void ExportXml(XmlWriter Output, ProfilerEvent Previous, TimeUnit TimeUnit)
Exports the event to XML.
ProfilerThread Thread
Profiler thread generating the event.
virtual void ExportPlantUmlPreparation()
Prepares the event for export to PlantUML
void AddAsIs(ProfilerEvent Event)
Adds an event, as-is.
Contains internal states used during generation of PlantUML diagram.s
StringBuilder GetBuilder(long Ticks)
Gets the PlantUML output StringBuilder associated with a time-point.
Class that keeps track of events and timing for one thread.
TimeUnit
Options for presenting time in reports.