| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Convex.Tasty.Streaming.TMSummary
Synopsis
- data ThreatModelSummary = ThreatModelSummary {}
- data TMStore
- newtype TMRecorder = TMRecorder {
- tmRecord :: String -> ThreatModelSummary -> IO ()
- newtype TMStoreOption = TMStoreOption (Maybe TMStore)
- data TraceRecorder = TraceRecorder {}
- newTMStore :: IO TMStore
- storeRecorder :: TMStore -> TMRecorder
- lookupThreatModelSummary :: TMStore -> String -> IO (Maybe ThreatModelSummary)
Documentation
data ThreatModelSummary Source #
Structured summary of a threat-model test case.
Constructors
| ThreatModelSummary | |
Instances
newtype TMRecorder Source #
A recorder closure passed to test bodies via Tasty's option system. The default no-op makes summaries silently dropped when the streaming reporter is not active.
Constructors
| TMRecorder | |
Fields
| |
Instances
| IsOption TMRecorder Source # | |
Defined in Convex.Tasty.Streaming.TMSummary Methods defaultValue :: TMRecorder Source # parseValue :: String -> Maybe TMRecorder Source # optionName :: Tagged TMRecorder String Source # optionHelp :: Tagged TMRecorder String Source # showDefaultValue :: TMRecorder -> Maybe String Source # | |
newtype TMStoreOption Source #
Internal option carrying the live store. Set by defaultMainStreaming
alongside the recorder so the reporter can read summaries back out.
Constructors
| TMStoreOption (Maybe TMStore) |
Instances
| IsOption TMStoreOption Source # | |
Defined in Convex.Tasty.Streaming.TMSummary Methods defaultValue :: TMStoreOption Source # parseValue :: String -> Maybe TMStoreOption Source # optionName :: Tagged TMStoreOption String Source # optionHelp :: Tagged TMStoreOption String Source # | |
data TraceRecorder Source #
Callback for recording iteration traces as pre-serialized JSON. Arguments: group name, category ("positive"/"negative"), pre-serialized trace JSON. Default is a no-op (zero overhead when streaming is not active).
When trEnabled returns True, test bodies use the expensive traced code
path (building IterationTrace values with UTxO snapshots, transaction
summaries, and JSON serialisation). When it returns False (the IsOption
default), the cheap runActions path is used instead, avoiding all that
work.
trEnabled is an IO action so that the decision can be deferred until the
streaming reporter has parsed --no-trace and written the shared IORef.
Constructors
| TraceRecorder | |
Instances
| IsOption TraceRecorder Source # | |
Defined in Convex.Tasty.Streaming.TMSummary Methods defaultValue :: TraceRecorder Source # parseValue :: String -> Maybe TraceRecorder Source # optionName :: Tagged TraceRecorder String Source # optionHelp :: Tagged TraceRecorder String Source # | |
newTMStore :: IO TMStore Source #
Allocate fresh storage. Call once per reporter run.
storeRecorder :: TMStore -> TMRecorder Source #
Build a recorder that writes into the given store.
lookupThreatModelSummary :: TMStore -> String -> IO (Maybe ThreatModelSummary) Source #
Look up a summary by key (does not delete).