| 1 | /* @title: Nightmare perturbation */ |
|---|---|
| 2 | #pragma once |
| 3 | #include <types/types.h> |
| 4 | |
| 5 | struct nightmare_ctx; |
| 6 | struct nightmare_worker; |
| 7 | |
| 8 | struct nightmare_perturb_config { |
| 9 | const char *name; |
| 10 | time_ns_t interval_us; |
| 11 | time_ns_t period_ms; |
| 12 | time_ns_t gap_ms; |
| 13 | }; |
| 14 | |
| 15 | struct nightmare_perturb_desc { |
| 16 | const char *name; |
| 17 | void (*thread)(struct nightmare_ctx *, struct nightmare_worker *); |
| 18 | }; |
| 19 | |
| 20 | const struct nightmare_perturb_config * |
| 21 | nightmare_perturb_config_lookup(const char *name); |
| 22 | const struct nightmare_perturb_desc *nightmare_perturb_lookup(const char *name); |
| 23 | |
| 24 | void nightmare_perturb_migrator(struct nightmare_ctx *ctx, |
| 25 | struct nightmare_worker *worker); |
| 26 | void nightmare_perturb_waker(struct nightmare_ctx *ctx, |
| 27 | struct nightmare_worker *worker); |
| 28 | void nightmare_perturb_apc_spammer(struct nightmare_ctx *ctx, |
| 29 | struct nightmare_worker *worker); |
| 30 | void nightmare_perturb_stutter(struct nightmare_ctx *ctx, |
| 31 | struct nightmare_worker *worker); |
| 32 | void nightmare_perturb_alloc_pressure(struct nightmare_ctx *ctx, |
| 33 | struct nightmare_worker *worker); |
| 34 | void nightmare_perturb_inject_armer(struct nightmare_ctx *ctx, |
| 35 | struct nightmare_worker *worker); |
| 36 |