Files
wlan-cloud-rrm/scripts/k6/simple.js
Jun Woo Shin a12656dd32 add a simple k6 script for loadtesting/benchig (#69)
Signed-off-by: Jun Woo Shin <jwoos@fb.com>
2022-09-13 16:35:18 -04:00

25 lines
414 B
JavaScript

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);
}