hello-world.js 394 B

1234567891011121314151617181920
  1. import http from 'k6/http'
  2. /**
  3. * 'Hello world' tests the raw server performance.
  4. */
  5. export const options = {
  6. stages: [
  7. { duration: '5s', target: 100 },
  8. { duration: '20s', target: 400 },
  9. { duration: '5s', target: 0 }
  10. ],
  11. thresholds: {
  12. http_req_failed: ['rate<0.01']
  13. }
  14. }
  15. /* global __ENV */
  16. export default function () {
  17. http.get(`${__ENV.CADDY_HOSTNAME}/sleep.php`)
  18. }