-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[EventHubs] Stress test refactor #20389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
4d35de3
init commit for stress
yunhaoling b67815d
add dotenv dep
yunhaoling 71a299c
docker, helm, k8s
yunhaoling f597260
apply changes
yunhaoling 7aa269f
run forever
yunhaoling c645bed
add chaos
yunhaoling 0fe91e5
Merge remote-tracking branch 'origin/main' into yuling/eh/stress-test
yunhaoling 7fc5dad
update chaos jos
yunhaoling e045833
Apply suggestions from code review
yunhaoling 083b17d
minor fixes
yunhaoling 8af4ce3
revert external targets
yunhaoling File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| dependencies: | ||
| - name: stress-test-addons | ||
| repository: https://stresstestcharts.blob.core.windows.net/helm/ | ||
| version: 0.1.6 | ||
| digest: sha256:b97697ef5f303eec43e9a94fca8e312d20b8aed71318250499344aeca9880d31 | ||
| generated: "2021-08-24T11:24:15.375395-07:00" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| apiVersion: v2 | ||
| name: python-eventhubs-stress-test | ||
| description: python event hubs stress test. | ||
| version: 0.1.1 | ||
| appVersion: v0.1 | ||
| annotations: | ||
| stressTest: 'true' | ||
| namespace: python-eventhubs-stress-test-ns | ||
|
|
||
| dependencies: | ||
| - name: stress-test-addons | ||
| version: 0.1.6 | ||
| repository: https://stresstestcharts.blob.core.windows.net/helm/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # syntax=docker/dockerfile:1 | ||
|
|
||
| FROM python:3.8-slim-buster | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| COPY ./scripts /app/stress/scripts | ||
|
|
||
| WORKDIR /app/stress/scripts | ||
| RUN pip3 install -r dev_requirement.txt |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", | ||
| "contentVersion": "1.0.0.0", | ||
| "parameters": { } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
9 changes: 9 additions & 0 deletions
9
sdk/eventhub/azure-eventhub/stress/scripts/dev_requirement.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| psutil | ||
| azure-eventhub | ||
| azure-eventhub-checkpointstoreblob | ||
| azure-eventhub-checkpointstoreblob-aio | ||
| azure-servicebus==0.50.3 | ||
| azure-storage-blob | ||
| azure-identity | ||
| opencensus-ext-azure | ||
| python-dotenv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
31 changes: 31 additions & 0 deletions
31
sdk/eventhub/azure-eventhub/stress/templates/network_loss.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| apiVersion: chaos-mesh.org/v1alpha1 | ||
| kind: NetworkChaos | ||
| metadata: | ||
| name: '{{ $.Release.Name }}-{{ $.Release.Revision }}' | ||
| namespace: {{ $.Release.Namespace }} | ||
| annotations: | ||
| experiment.chaos-mesh.org/pause: 'true' | ||
| labels: | ||
| scenario: 'stress' | ||
| release: '{{ $.Release.Name }}' | ||
| revision: '{{ $.Release.Revision }}' | ||
| spec: | ||
| scheduler: | ||
| cron: '@every 30s' | ||
| duration: '10s' | ||
| action: loss | ||
| direction: to | ||
| externalTargets: | ||
| - 'eh-stress-{{ .Release.Name }}-{{ .Release.Revision}}.servicebus.windows.net' | ||
| mode: one | ||
| selector: | ||
| labelSelectors: | ||
| testInstance: 'deploy-python-eh-stress-instance' | ||
yunhaoling marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| chaos: 'true' | ||
| namespaces: | ||
| - {{ $.Release.Namespace }} | ||
| podPhaseSelectors: | ||
| - 'Running' | ||
| loss: | ||
| loss: '100' | ||
| correlation: '100' | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| {{- include "stress-test-addons.deploy-job-template.from-pod" (list . "stress.python-eh-stress") -}} | ||
| {{- define "stress.python-eh-stress" -}} | ||
| metadata: | ||
| labels: | ||
| testName: "deploy-python-eh-stress" | ||
| testInstance: "deploy-python-eh-stress-instance" | ||
| chaos: "true" | ||
| spec: | ||
| containers: | ||
| - name: python-eh-stress | ||
| image: stresstestregistry.azurecr.io/yuling/py-eh-stress:v2 | ||
yunhaoling marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| {{- include "stress-test-addons.container-env" . | nindent 6 }} | ||
| command: ['bash', '-c', 'python3 azure_eventhub_producer_stress.py & python3 azure_eventhub_consumer_stress_sync.py'] | ||
yunhaoling marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| # async test command | ||
| # command: ['bash', '-c', 'python3 azure_eventhub_producer_stress.py -m stress_send_list_async & python3 azure_eventhub_consumer_stress_async.py'] | ||
| {{- end -}} | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.