A load test platform for writing a load test script by rust. Just like JMeter, but it prefer using like SDK, not a GUI tool. It is: * Fast RuMeter's zero-cost abstractions give you bare-metal performance. * Extensiable RuMeter is easy to use and develop your own components. * Script RuMeter is just an SDK, and the best way to use it is using in your script.
A basic HTTP API load test with RuMeter.
Make sure you add the dependence on your Cargo.toml:
toml
[dependencies]
rumeter-component = "0.1.3"
Then, you should define your own controller first. Your controller must implement trait Controller: ```rust
pub struct SimpleController;
impl Controller for SimpleController {
async fn run(&self) -> Vec
Then, on your main.rs: ```rust,no_run
async fn main() -> Result<(), Box
tracing_subscriber::fmt()
.with_max_level(tracing::Level::INFO)
.with_span_events(FmtSpan::CLOSE)
.init();
let group = ThreadGroup::new(10, Duration::from_secs(1), -1, Some(Duration::from_secs(300)));
// let group = ThreadGroup::new(10, Duration::from_secs(1), 10, None);
let out = FileOutput::new(File::create("http.rtl").unwrap());
group.start(SimpleController::default(), Arc::new(Mutex::new(out))).await;
info!("test finished");
Ok(())
} ```
more examples can be found here.
The rtl(RuMeter Test Log) file is a csv type file. You can use [JMeter] to generate the html style report like this:
Shell
$ jmeter -g [your.rtl] -o [report_path]
Now only a few sampler has implemented. More commonly used samplers will implement in future version.
This project is licensed under the [MIT license].
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in RuMeter by you, shall be licensed as MIT, without any additional terms or conditions.