PropertyDamage.Differential.Result (PropertyDamage v0.2.0)
View SourceResult from differential testing.
Contains comparison results, divergences, and performance metrics.
Summary
Functions
Get the number of divergences found.
Check if the result indicates divergence was found.
Check if the result indicates all targets are equivalent.
Format the result for display.
Get metrics for a specific target.
Types
@type divergence() :: %{ :seed => integer(), :command => struct(), :step => non_neg_integer(), :reference_result => term(), :results => map(), optional(:divergent_target) => String.t(), optional(:divergent_result) => term(), optional(:run_index) => non_neg_integer(), optional(:reference_name) => String.t() }
@type metrics() :: %{ optional(:latency_p50) => float(), optional(:latency_p95) => float(), optional(:latency_p99) => float(), optional(:latency_mean) => float(), optional(:latency_min) => float(), optional(:latency_max) => float(), optional(:total_commands) => non_neg_integer(), optional(:error_count) => non_neg_integer(), optional(:error_rate) => float(), optional(:error) => atom(), optional(:reason) => term() }
@type t() :: %PropertyDamage.Differential.Result{ baseline: String.t() | nil, divergences: [divergence()], execution: :interleaved | :sequential, metrics: %{required(String.t()) => metrics()}, mode: :correctness | :performance | :both, reference: String.t() | nil, runs: non_neg_integer(), seed: integer(), status: :equivalent | :divergent | :complete, targets: [String.t()] }
Functions
@spec divergence_count(t()) :: non_neg_integer()
Get the number of divergences found.
Check if the result indicates divergence was found.
Check if the result indicates all targets are equivalent.
Format the result for display.
Get metrics for a specific target.