# `Aludel.Stats.Overview`
[🔗](https://github.com/ccarvalho-eng/aludel/blob/main/lib/aludel/stats/overview.ex#L1)

Top-line dashboard metrics and bounded period comparisons.

# `avg_latency`

```elixir
@spec avg_latency() :: number()
```

Returns average latency across prompt-run results, or zero when unavailable.

# `comparison_stats`

```elixir
@spec comparison_stats(pos_integer()) :: map()
```

Compares the current period with the immediately preceding period.

The period defaults to seven days. Counts, quality, cost, latency, stability,
regression signals, and total-run trend are calculated with bounded period
queries.

# `comparison_stats`

```elixir
@spec comparison_stats(pos_integer(), DateTime.t()) :: map()
```

Compares adjacent periods ending at the supplied UTC timestamp.

# `rolling_comparisons`

```elixir
@spec rolling_comparisons(DateTime.t()) :: %{required(pos_integer()) =&gt; map()}
```

Returns seven-day and thirty-day period comparisons keyed by window length.

# `success_rate`

```elixir
@spec success_rate(integer(), integer()) :: float()
```

Calculates a percentage success rate, returning `0.0` when no tests exist.

# `test_totals`

```elixir
@spec test_totals() :: {integer(), integer()}
```

Returns total passed and failed tests across suite runs.

# `total_runs`

```elixir
@spec total_runs() :: integer()
```

Counts all recorded prompt runs and suite runs.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
