Faultline API Reference
API reference generated by dotnet fe doc — 55 public type(s).
Faultline.Analyzers
| Type | Kind | Summary |
|---|---|---|
NonDeterminismAnalyzer | class | Roslyn analyzer flagging non-deterministic escapes that cannot be safely virtualized by IL rewriting inside Faultline deterministic simulations. |
Faultline.AspNetCore
| Type | Kind | Summary |
|---|---|---|
FaultlineKestrelExtensions | class | Extension methods for wiring Faultline's virtual network transport into ASP.NET Core / Kestrel. |
SimConnectionContext | class | Kestrel ConnectionContext backed by a Faultline in-memory SimStream. |
SimConnectionListener | class | Kestrel IConnectionListener accepting incoming SimStream connections from a Faultline SimListener. |
SimConnectionListenerFactory | class | Kestrel IConnectionListenerFactory that binds endpoints onto a Faultline SimHost's virtual network instead of real OS sockets. |
Faultline
| Type | Kind | Summary |
|---|---|---|
ChromeTraceArgs | record | |
ChromeTraceDocument | record | |
ChromeTraceEvent | record | |
SimClock | class | Virtual TimeProvider backed by SimEngine's discrete-event clock, with optional per-host static clock offset and linear ppm drift rate. |
SimContext | class | Ambient simulation context flowing automatically across async/await boundaries via AsyncLocal<T>. |
SimDeadlockException | class | Thrown when the simulation has no ready continuations and no pending timed events, yet the scenario task has not completed. |
SimEngine | class | Single-threaded discrete-event simulation engine driving virtual time, deterministic task scheduling, and deadlock/timeout detection. |
SimException | class | Base exception for simulation failures, always carrying the reproduction seed and virtual time. |
SimHost | class | Represents a virtual node/host executing inside a SimWorld, with its own virtual clock, deterministic PRNG, virtual network endpoints, and crash/restart lifecycle. |
SimRandom | class | A deterministic, cross-platform pseudo-random number generator backed by Xoshiro256** seeded via SplitMix64. Produces identical sequences across .NET versions and operating systems. |
SimSchedulingPolicy | enum | |
SimTimeoutException | class | Thrown when the simulation exceeds its configured maximum virtual duration or step budget. |
SimTrace | class | Records a bounded deterministic timeline of simulation events for post-mortem failure diagnostics and structured JSON / Chrome Trace (Perfetto) export. |
SimTraceEntry | record struct | |
SimWorld | class | Top-level entry point for running deterministic simulations in Faultline. |
SimWorldOptions | record |
Faultline.Interception
| Type | Kind | Summary |
|---|---|---|
FaultlineRewrittenAttribute | class | Applied to assemblies that have been instrumented by the Faultline IL rewriter to ensure rewriting is idempotent across incremental builds. |
SimFileHooks | class | Interception targets for File and FileStream APIs. Routes file reads, writes, streams, existence checks, and deletes to SimHost.FileSystem when executing inside a Faultline simulation, or passes through to the real OS filesystem outside. |
SimNetworkHooks | class | Interception targets for .NET networking and HTTP clients. Routes HttpClient and SocketsHttpHandler traffic over SimNetwork when running inside a Faultline simulation. |
SimRandomHooks | class | Interception targets for BCL randomness and GUID generation APIs. |
SimSchedulerHooks | class | Interception targets for BCL task scheduling and ThreadPool queueing APIs. |
SimSocketHooks | class | Interception targets for raw Socket TCP client/server operations. Routes Socket bind, listen, accept, connect, send, and receive calls over SimNetwork when running inside a Faultline simulation. |
SimTcpHooks | class | Interception targets for TcpClient and TcpListener. Routes TCP connections and listeners over SimNetwork when executing inside a Faultline simulation without opening OS sockets. |
SimTimeHooks | class | Interception targets for BCL time and timer APIs. When running outside a Faultline simulation, calls transparently pass through to the real BCL. |
SimTimerHooks | class | Interception targets for Timer. Schedules timer callbacks deterministically on SimEngine when running inside a Faultline simulation without activating real OS timer threads. |
Faultline.Network
| Type | Kind | Summary |
|---|---|---|
SimDatagram | record struct | |
SimHttpMessageHandler | class | A 100% deterministic, single-threaded HTTP/1.1 HttpMessageHandler that executes requests directly over SimNetwork and SimStream without spawning background ThreadPool connection-pool threads or real wall-clock timers. |
SimLinkConfig | class | Per-link network simulation parameters between two virtual hosts. |
SimListener | class | Virtual TCP listener bound to a (SimHost, port) endpoint on SimNetwork. |
SimNetwork | class | In-memory virtual network router supporting per-link latency, packet drop rates, symmetric/asymmetric partitions, and deterministic connection delivery. |
SimNetworkStream | class | Virtual NetworkStream backed by a Faultline SimStream. Enables unmodified TcpClient code to read and write over SimNetwork. |
SimStream | class | Full-duplex in-memory Stream backed by SimEngine's discrete-event clock and SimNetwork's latency, partition, and crash-reset semantics. |
SimUdpSocket | class | Virtual UDP datagram socket bound to a (SimHost, port) endpoint on SimNetwork. Supports independent per-datagram latency (allowing out-of-order delivery), drops, duplication, and bandwidth limits. |
Faultline.Rewriter
| Type | Kind | Summary |
|---|---|---|
AssemblyRewriter | class | Rewrites compiled .NET assemblies using AsmResolver to redirect non-deterministic BCL calls (time, randomness, task scheduling) into Faultline's deterministic simulation hooks. |
DefaultRewriteRules | class | |
RewriteResult | record | |
RewriteRule | record | |
RewriterCli | class |
Faultline.Storage
| Type | Kind | Summary |
|---|---|---|
SimDiskConfig | class | Configuration for simulated disk I/O latency and crash-fault behavior on a SimFileSystem. |
SimFileStream | class | Virtual FileStream backed by a host's SimFileSystem. Preserves buffered vs. fsync durability semantics without touching the real OS filesystem. |
SimFileSystem | class | Per-host in-memory virtual filesystem with explicit fsync durability semantics. Flushed files survive SimHost.Crash and SimHost.Restart; unflushed writes are discarded (or partially torn when SimDiskConfig.TornWriteProbability > 0). |
Faultline.Testing
| Type | Kind | Summary |
|---|---|---|
SimRunFailureException | class | Thrown when a simulation fails during SimRunner.Explore or SimRunner.Replay, including the exact reproduction seed and trailing simulation trace. |
SimRunner | class | Multi-seed exploration, single-seed replay, and determinism assertion helpers for Faultline tests. |
SimSeedsAttribute | class | xUnit DataAttribute that supplies deterministic ulong seeds to a [Theory] simulation test—either a range of seeds for exploration or specific seeds for replay. |
Faultline.Tool
| Type | Kind | Summary |
|---|---|---|
AuditCommand | class | |
AuditFinding | record | |
AuditReport | record | |
FaultlineCli | class | |
FuzzCommand | class | |
InspectCommand | class |