# `ExternalService.Simulation`
[🔗](https://github.com/jvoegele/external_service/blob/main/lib/external_service/simulation.ex#L1)

The result of `ExternalService.simulate/3`.

  * `:opens_after` — how many failing calls it took to open the circuit breaker,
    or `:never` if it stayed closed for the whole simulation.
  * `:worst_call` — the longest call, in milliseconds.
  * `:attempts` — how many attempts reached the dependency, in total. This is the
    load a failing dependency takes before you stop calling it.
  * `:calls` — how many calls were simulated.
  * `:elapsed` — simulated time, in milliseconds.
  * `:scenario` — the scenario that was run.

# `t`

```elixir
@type t() :: %ExternalService.Simulation{
  attempts: non_neg_integer(),
  calls: pos_integer(),
  elapsed: non_neg_integer(),
  opens_after: pos_integer() | :never,
  scenario: ExternalService.scenario(),
  worst_call: non_neg_integer()
}
```

---

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