twelve_service 0.1.4

Just for demo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import http from 'k6/http';
import { check, sleep } from 'k6';

export const options = {
    stages: [
        { duration: '5s', target:  4000},
        { duration: '1m', target: 4000 },
        { duration: '5s', target: 0 },
    ],
};

export default function () {
    const res = http.get('http://localhost:8080/v1/demo/hello');
    check(res, { 'status was 200': (r) => r.status == 200 });
    sleep(1);
}