gen_cluster nodes=5
----

gen_ranges ranges=500 placement_skew=true
----

set_capacity store=5 io_threshold=1
----

assertion type=stat stat=replicas stores=(5) exact_bound=0 ticks=5
----

eval duration=10m seed=42
----
OK

# Expect s5 to get no replicas due to IO overload. The plot below should show a
# solid line at 0, which will be s5's replica count.
plot stat=replicas
----
----

 500 ┼───╮──╭─╮
 467 ┤   ╰──╯─╰──────────╮╮ ╭─╮
 433 ┤                ╰──╰────────────╮╮╮
 400 ┤                               ╰╰───────────╮─╮     ╭╮  ╭╮╭──╮╭───╮─╮
 367 ┤                                            ╰─╭─────╯╰──╯╰╯──╰╯───╰────────────
 333 ┤                                         ╭────╯
 300 ┤                                     ╭───╯
 267 ┤                                 ╭───╯
 233 ┤                            ╭────╯
 200 ┤                        ╭───╯
 167 ┤                   ╭────╯
 133 ┤               ╭───╯
 100 ┤           ╭───╯
  67 ┤      ╭────╯
  33 ┤  ╭───╯
   0 ┼───────────────────────────────────────────────────────────────────────────────
                                          replicas
----
----

plot stat=leases
----
----

 500 ┼─────╮
 467 ┤     ╰─────────╮
 433 ┤               ╰─────────╮
 400 ┤                         ╰─────────╮
 367 ┤                                   ╰───────────╮
 333 ┤                                               ╰─────╮
 300 ┤                                                     ╰──────╮
 267 ┤                                                            ╰─────────╮
 233 ┤                                                                      ╰────────
 200 ┤
 167 ┤
 133 ┤                                       ╭╮ ╭──────────────────────╮
 100 ┤                         ╭─────────────╯╰─╯                      ╰─────────────
  67 ┤               ╭─────────╯                                  ╭───╭──────────────
  33 ┤     ╭─────────╯                                  ╭╭────────────╯
   0 ┼───────────────────────────────────────────────────────────────────────────────
                                           leases
----
----
