Skip to content

Commit

Permalink
Merge pull request #111 from celo-org/jcortejoso/loadtest-small-refactor
Browse files Browse the repository at this point in the history
Refactor to loadtest to support latest changes from jcortejoso/patch-celotool-loadtest
  • Loading branch information
jcortejoso authored Jul 18, 2023
2 parents 8863047 + ca3b258 commit 6a1615a
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 19 deletions.
2 changes: 1 addition & 1 deletion charts/load-test/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: v2
name: load-test
type: application
icon: https://pbs.twimg.com/profile_images/1613170131491848195/InjXBNx9_400x400.jpg
version: 0.1.2
version: 0.2.0
description: Chart which is used to run load test for a Celo Network
keywords:
- Celo
Expand Down
12 changes: 7 additions & 5 deletions charts/load-test/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# load-test

![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.0.0](https://img.shields.io/badge/AppVersion-v1.0.0-informational?style=flat-square)
![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v1.0.0](https://img.shields.io/badge/AppVersion-v1.0.0-informational?style=flat-square)

Chart which is used to run load test for a Celo Network

Expand All @@ -24,9 +24,11 @@ Chart which is used to run load test for a Celo Network
| blockscout.url | string | `"https://globaltestnet-blockscout.global-testnet-us-west1.blockchaintestsglobaltestnet.org"` | |
| bootnodeIpAddress | string | `"34.83.130.228"` | |
| celotool.image.repository | string | `"gcr.io/celo-testnet/celo-monorepo"` | |
| celotool.image.tag | string | `"celotool-6a565197ca569afbf6b0414ba384419489a11daf"` | |
| celotool.image.tag | string | `"celotool-a829487e24d0295247d5f78e98dee2abf8554947"` | |
| delay | int | `0` | |
| extraArgs | string | `""` | |
| extraArgs[0] | string | `"--total-tx-gas 100000"` | |
| extraArgs[1] | string | `"--max-gas-price 25000000000"` | |
| generatePrivateKeys | bool | `false` | |
| genesis.genesisForceUrl | string | `"https://gist.githubusercontent.com/jcortejoso/eba86918c7b7c7546589edd9a32f1f08/raw/b564a1cb50c1fb5261ea5238b0c0b2d055af9ba4/genesis.json"` | |
| genesis.network | string | `"globaltestnet"` | |
| genesis.useGenesisFileBase64 | bool | `false` | |
Expand All @@ -40,10 +42,10 @@ Chart which is used to run load test for a Celo Network
| initialCount | int | `0` | |
| mnemonic | string | `"girl beauty clarify deliver force dynamic wonder shoe install erosion rib resource cannon topple prevent slot brown zero banana exercise quiz spot mercy misery"` | |
| replicas | int | `0` | |
| reuse_light_clients | bool | `true` | |
| testMode | string | `"mixed"` | |
| threads | int | `30` | |
| use_random_recipient | bool | `false` | |
| useRandomRecipient | bool | `false` | |
| web3Provider | string | `"http://localhost:8545"` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)
12 changes: 8 additions & 4 deletions charts/load-test/templates/load-test.statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ spec:
component: load-test
spec:
initContainers:
{{- include "common.conditional-init-genesis-container" . | nindent 6 }}
{{- if .Values.generatePrivateKeys }}
- name: generate-keys
image: {{ .Values.celotool.image.repository }}:{{ .Values.celotool.image.tag }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
Expand Down Expand Up @@ -82,7 +84,6 @@ spec:
volumeMounts:
- name: data
mountPath: /root/.celo
{{- include "common.conditional-init-genesis-container" . | nindent 6 }}
- name: import-geth-account
image: {{ .Values.geth.image.repository }}:{{ .Values.geth.image.tag }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
Expand All @@ -99,7 +100,9 @@ spec:
- name: account
mountPath: "/root/.celo/account"
readOnly: true
{{- end }}
containers:
{{- if contains "localhost" .Values.web3Provider }}
{{- if $reuseClient }}
- name: geth
image: {{ $.Values.geth.image.repository }}:{{ $.Values.geth.image.tag }}
Expand Down Expand Up @@ -187,6 +190,7 @@ spec:
mountPath: "/root/.celo_share/account"
readOnly: true
{{- end -}}
{{- end -}}
{{- end }}
- name: simulate-client
image: {{ .Values.celotool.image.repository }}:{{ .Values.celotool.image.tag }}
Expand All @@ -213,14 +217,14 @@ spec:
--mnemonic "$MNEMONIC" \
--test-mode={{ .Values.testMode }} \
{{- with .Values.extraArgs }}
{{ . | nindent 14 }}
{{ toYaml . | nindent 14 }} \
{{- end }}
--blockscout-url {{ .Values.blockscout.url }} \
--blockscoutMeasurePercent {{ .Values.blockscout.measurePercent }} \
--client-count {{ .Values.threads | default "1" }}
env:
- name: LOAD_TEST_USE_RANDOM_RECIPIENT
value: "{{ default "true" .Values.use_random_recipient }}"
value: "{{ default "true" .Values.useRandomRecipient }}"
- name: MNEMONIC
valueFrom:
secretKeyRef:
Expand All @@ -245,7 +249,7 @@ spec:
- name: account
secret:
secretName: {{ template "common.fullname" . }}-load-test
{{- if $reuseClient }}
{{- if and $reuseClient (contains "localhost" .Values.web3Provider) }}
volumeClaimTemplates:
- metadata:
name: data
Expand Down
22 changes: 13 additions & 9 deletions charts/load-test/values.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
---
testMode: mixed
extraArgs: ''
extraArgs:
- --total-tx-gas 100000
- --max-gas-price 25000000000
replicas: 0
threads: 30
# For multi-cluster setups
initialCount: 0
mnemonic: girl beauty clarify deliver force dynamic wonder shoe install erosion rib
resource cannon topple prevent slot brown zero banana exercise quiz spot mercy misery
web3Provider: http://localhost:8545
generatePrivateKeys: false
useRandomRecipient: false
blockscout:
measurePercent: 0
url: https://globaltestnet-blockscout.global-testnet-us-west1.blockchaintestsglobaltestnet.org
bootnodeIpAddress: 34.83.130.228
celotool:
image:
repository: gcr.io/celo-testnet/celo-monorepo
tag: celotool-6a565197ca569afbf6b0414ba384419489a11daf
tag: celotool-a829487e24d0295247d5f78e98dee2abf8554947
delay: 0
genesis:
network: globaltestnet
Expand All @@ -23,10 +34,3 @@ geth:
staticNodes: ''
verbosity: 1
imagePullPolicy: Always
initialCount: 0
mnemonic: girl beauty clarify deliver force dynamic wonder shoe install erosion rib
resource cannon topple prevent slot brown zero banana exercise quiz spot mercy misery
replicas: 0
reuse_light_clients: true
threads: 30
use_random_recipient: false

0 comments on commit 6a1615a

Please sign in to comment.