Vegeta
$ vela addon enable vegeta
$ 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
apiVersion: core.oam.dev/v1beta1kind: Applicationmetadata:name: new-vegetanamespace: vegetaspec:components:- name: new-vegetatype: webserviceproperties:exposeType: ClusterIPimage: nginx:latestports:- expose: trueport: 80protocol: TCPports: 80traits:- type: vegetaproperties:dorequest: 'GET http://show-vegeta:80'parallelism: 1backofflimit: 10
Check the app status and trait status
vela ls app -n vegetaAPP COMPONENT TYPE TRAITS PHASE HEALTHY STATUS CREATED-TIMEnew-vegeta new-vegeta webservice vegeta running healthy Ready:1/1 2022-05-31 21:24:28 +0800 CSTvela status new-vegeta -n vegetaAbout:Name: new-vegetaNamespace: vegetaCreated at: 2022-05-31 21:24:28 +0800 CSTStatus: runningWorkflow:mode: DAGfinished: trueSuspend: falseTerminated: falseSteps- id:rqfzusuxgjname:new-vegetatype:apply-componentphase:succeededmessage:Services:- Name: new-vegetaCluster: local Namespace: vegetaType: webserviceHealthy Ready:1/1Traits:? vegetavela logs new-vegeta --name new-vegeta -n vegeta? You have 2 deployed resources in your app. Please choose one: [Use arrows to move, type to filter]> Cluster: local | Namespace: vegeta | Kind: Deployment | Name: new-vegetaCluster: local | Namespace: vegeta | Kind: Job | Name: new-vegetaChoose 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
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
- How to install jplot and jagrr
Last updated on Feb 9, 2023 by dependabot[bot]