Skip to content

RuntimeTracer

Namespace: Dotsider.Core.Analysis

Assembly: Dotsider.Core.dll

Launches a .NET target and collects its runtime diagnostics. Uses the bundled trace host to keep TraceEvent outside the Native AOT process. Exposes events, counters, output, and lifecycle state to dotsider callers.

public sealed class RuntimeTracer : IDisposable

ObjectRuntimeTracer

RuntimeTracer(string, IReadOnlyList<string>, Action)

Section titled “RuntimeTracer(string, IReadOnlyList<string>, Action)”

Launches a .NET target and collects its runtime diagnostics. Uses the bundled trace host to keep TraceEvent outside the Native AOT process. Exposes events, counters, output, and lifecycle state to dotsider callers.

Parameters:

  • assemblyPath (String): The managed DLL or executable apphost to launch.
  • arguments (IReadOnlyList<String>): The literal application arguments to pass to the launched process.
  • invalidate (Action): The callback that requests a UI refresh.
public RuntimeTracer(string assemblyPath, IReadOnlyList<string> arguments, Action invalidate)

The elapsed time since the trace was started.

Returns: TimeSpan

public TimeSpan Elapsed { get; }

The error message if the trace failed, or null.

Returns: String

public string? ErrorMessage { get; }

The exit code of the traced process, or null if not yet exited.

Returns: Nullable<Int32>

public int? ExitCode { get; }

The OS process ID of the traced process, or null if not started.

Returns: Nullable<Int32>

public int? ProcessId { get; }

The current state of the traced process.

Returns: TraceProcessState

public TraceProcessState ProcessState { get; }
public void Dispose()

Returns a snapshot of all collected events (copied under lock).

Returns: IReadOnlyList<TraceEventEntry>

public IReadOnlyList<TraceEventEntry> GetEvents()

Returns the most recent counter snapshot, or null.

Returns: CounterSnapshot

public CounterSnapshot? GetLatestCounters()

Returns process output lines.

Returns: IReadOnlyList<OutputLine>

public IReadOnlyList<OutputLine> GetOutput()

Returns aggregated summary statistics.

Returns: TraceSummary

public TraceSummary GetSummary()

Launches the target process and starts collecting events.

public void Start()

Stops the traced process and event collection.

public void Stop()