///|
fn percentile(values : Array[UInt64], percent : Int32) -> UInt64 {
let ordered = values.copy()
ordered.sort_by(fn(a, b) { a.compare(b) })
ordered[(ordered.length() * percent + 99) / 100 - 1]
}
///|
fn workload(count : Int32, changed : Int32) -> Unit raise {
let documents : Map[String, Json] = Map([])
let operations : Array[Json] = []
let cases : Array[@contracts.ConsumerCase] = []
for i in 0..