Registry / Library

library · v0.1.0
SampleQuota
Allocate a bounded log buffer with higher priority for important records.
Use SampleQuota
use vendor::samplequota::samplequota;
Run the example
nest demo samplequota@0.1.0
blyxc native-run samplequota-demo/main.blyx
Example source and expected output
use vendor::samplequota::samplequota;
fn main() {
let important = 3.0;
let ordinary = 7.0;
let capacity = 5.0;
let result = samplequota_plan(important, ordinary, capacity);
if len(result) == 0 { println!("invalid"); return; }
let mut i = 0;
while i < len(result) {
println!(at(result, i));
i += 1;
}
}
Expected output
3
2
5
Published versions
| Version | Package | Source commit | SHA-256 |
|---|---|---|---|
| 0.1.0 | Download ZIP | 56cf889134 | 4bdfb5255aea67e5bc5aa5eb0c68d0bf8e50e2187837909d336b75b43f725e03 |