Vegeta

  1. $ vela addon enable vegeta
  1. $ vela addon disable vegeta

Vegeta Trait supports following component types: webservice, worker and cloneset.

Use a component typed webservice to start, keep the following to show-vegeta.yaml, then vela up -f show-vegeta.yaml

  1. apiVersion: core.oam.dev/v1beta1
  2. kind: Application
  3. metadata:
  4. name: new-vegeta
  5. namespace: vegeta
  6. spec:
  7. components:
  8. - name: new-vegeta
  9. type: webservice
  10. properties:
  11. exposeType: ClusterIP
  12. image: nginx:latest
  13. ports:
  14. - expose: true
  15. port: 80
  16. protocol: TCP
  17. ports: 80
  18. traits:
  19. - type: vegeta
  20. properties:
  21. dorequest: 'GET http://show-vegeta:80'
  22. parallelism: 1
  23. backofflimit: 10

Check the app status and trait status

  1. vela ls app -n vegeta
  2. APP COMPONENT TYPE TRAITS PHASE HEALTHY STATUS CREATED-TIME
  3. new-vegeta new-vegeta webservice vegeta running healthy Ready:1/1 2022-05-31 21:24:28 +0800 CST
  4. vela status new-vegeta -n vegeta
  5. About:
  6. Name: new-vegeta
  7. Namespace: vegeta
  8. Created at: 2022-05-31 21:24:28 +0800 CST
  9. Status: running
  10. Workflow:
  11. mode: DAG
  12. finished: true
  13. Suspend: false
  14. Terminated: false
  15. Steps
  16. - id:rqfzusuxgj
  17. name:new-vegeta
  18. type:apply-component
  19. phase:succeeded
  20. message:
  21. Services:
  22. - Name: new-vegeta
  23. Cluster: local Namespace: vegeta
  24. Type: webservice
  25. Healthy Ready:1/1
  26. Traits:
  27. ? vegeta
  28. vela logs new-vegeta --name new-vegeta -n vegeta
  29. ? You have 2 deployed resources in your app. Please choose one: [Use arrows to move, type to filter]
  30. > Cluster: local | Namespace: vegeta | Kind: Deployment | Name: new-vegeta
  31. Cluster: local | Namespace: vegeta | Kind: Job | Name: new-vegeta
  32. Choose the Job to show testing data logs
  • If you want a more nice demo, use the two tools: jaggr and jplot to show the data
  1. kubectl logs new-vegeta--1-qrh67 -n vegeta -f | jaggr @count=rps hist\[100,200,300,400,500\]:code p25,p50,p95:latency sum:bytes_in sum:bytes_out | jplot rps+code.hist.100+code.hist.200+code.hist.300+code.hist.400+code.hist.500 latency.p95+latency.p50+latency.p25 bytes_in.sum+bytes_out.sum

Last updated on Aug 4, 2023 by Daniel Higuero