RuntimeTracer
Namespace: Dotsider.Core.Analysis
Assembly: Dotsider.Core.dll
Manages launching a .NET assembly as a child process and collecting runtime events via EventPipe diagnostics (PID-based connect with retry).
public sealed class RuntimeTracer : IDisposableInheritance
Section titled “Inheritance”Object → RuntimeTracer
Implements
Section titled “Implements”Constructors
Section titled “Constructors”RuntimeTracer(string, string, Action)
Section titled “RuntimeTracer(string, string, Action)”Manages launching a .NET assembly as a child process and collecting runtime events via EventPipe diagnostics (PID-based connect with retry).
Parameters:
public RuntimeTracer(string assemblyPath, string arguments, Action invalidate)Properties
Section titled “Properties”Elapsed
Section titled “Elapsed”The elapsed time since the trace was started.
Returns: TimeSpan
public TimeSpan Elapsed { get; }ErrorMessage
Section titled “ErrorMessage”The error message if the trace failed, or null.
Returns: String
public string? ErrorMessage { get; }ExitCode
Section titled “ExitCode”The exit code of the traced process, or null if not yet exited.
Returns: Nullable<Int32>
public int? ExitCode { get; }ProcessId
Section titled “ProcessId”The OS process ID of the traced process, or null if not started.
Returns: Nullable<Int32>
public int? ProcessId { get; }ProcessState
Section titled “ProcessState”The current state of the traced process.
Returns: TraceProcessState
public TraceProcessState ProcessState { get; }Methods
Section titled “Methods”Dispose()
Section titled “Dispose()”Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()GetEvents()
Section titled “GetEvents()”Returns a snapshot of all collected events (copied under lock).
Returns: IReadOnlyList<TraceEventEntry>
public IReadOnlyList<TraceEventEntry> GetEvents()GetLatestCounters()
Section titled “GetLatestCounters()”Returns the most recent counter snapshot, or null.
Returns: CounterSnapshot
public CounterSnapshot? GetLatestCounters()GetOutput()
Section titled “GetOutput()”Returns process output lines.
Returns: IReadOnlyList<OutputLine>
public IReadOnlyList<OutputLine> GetOutput()GetSummary()
Section titled “GetSummary()”Returns aggregated summary statistics.
Returns: TraceSummary
public TraceSummary GetSummary()Start()
Section titled “Start()”Launches the target process and starts collecting events.
public void Start()Stop()
Section titled “Stop()”Stops the traced process and event collection.
public void Stop()