Budget a log buffer during an error burst
A burst of low-severity messages can consume all available slots. Quantify how much high-severity evidence a bounded buffer would retain. Three records cross the importance threshold, but the buffer has two slots. One high-severity record must be dropped.
Run the framework with your own input
Install Blyx 0.2.1 and a Rust toolchain with a host linker, then run the versioned project. Each positional argument is a number or a comma-separated numerical vector. The CLI accepts up to 16 entries per vector. The imported module accepts longer inputs.
git clone --depth 1 --branch v0.1.0 https://github.com/Rahulchaube1/blyx-raven.git
cd blyx-raven
blyxc native-run project.blyx -- "9,17,9,21,21" 17 2API and return values
Returns [important retained, ordinary retained, dropped, high-severity drops]. Use the plan to allocate slots in a host logger. Invalid input returns an empty vector.
| Argument | Accepted input |
|---|---|
| severity | Vector of: nonnegative exact integer |
| threshold | nonnegative exact integer |
| capacity | nonnegative exact integer |
Use the libraries independently
The framework vendors the same library source published in these two repositories. Each module has its own package page, input contract and regression suite.
Try the program
Expected output
2 0 3 1
Practice
Change severity = [9, 17, 9]. Predict the result, then run the program.
Hint
Returns [important retained, ordinary retained, dropped, high-severity drops]. Use the plan to allocate slots in a host logger.
Worked solution
The result vector is [1, 1, 1, 0]. Compare its fields with the return layout in the API section.
Find
let severity = [9, 17, 9, 21, 21];Replace with
let severity = [9, 17, 9];Output after the change
1 1 1 0
