mirror of
https://github.com/Telecominfraproject/wlan-cloud-rrm.git
synced 2025-10-29 17:52:24 +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