mirror of
https://github.com/Telecominfraproject/wlan-cloud-rrm.git
synced 2025-10-30 18:17:58 +00:00
add a simple k6 script for loadtesting/benchig (#69)
Signed-off-by: Jun Woo Shin <jwoos@fb.com>
This commit is contained in:
24
scripts/k6/simple.js
Normal file
24
scripts/k6/simple.js
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
import http from 'k6/http';
|
||||||
|
import { sleep } from 'k6';
|
||||||
|
|
||||||
|
|
||||||
|
const BASE_URL = 'http://localhost:16789/api/v1';
|
||||||
|
|
||||||
|
export default function () {
|
||||||
|
const endpoints = [
|
||||||
|
'algorithms',
|
||||||
|
'provider',
|
||||||
|
'system',
|
||||||
|
'getToplogy',
|
||||||
|
'currentModel',
|
||||||
|
];
|
||||||
|
const requests = endpoints.map(endpoint => {
|
||||||
|
return {
|
||||||
|
method: 'GET',
|
||||||
|
url: `${BASE_URL}/${endpoint}`,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
let responses = http.batch(requests);
|
||||||
|
sleep(0.1);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user