Skip to content

Commit

Permalink
Update messaging stress to use addons parallel job configuration (Azu…
Browse files Browse the repository at this point in the history
  • Loading branch information
benbp authored and matthohn-msft committed Oct 27, 2023
1 parent d253081 commit ef86729
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 92 deletions.
6 changes: 3 additions & 3 deletions sdk/eventhub/Azure.Messaging.EventHubs/stress/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: stress-test-addons
repository: https://stresstestcharts.blob.core.windows.net/helm/
version: 0.1.20
digest: sha256:174a2f4b768cb47718d4b3d5a506330aa781abb31803fbeaeba3b7eef87a9f38
generated: "2022-07-26T17:51:35.3973882-04:00"
version: 0.3.0
digest: sha256:3e21a7fdf5d6b37e871a6dd9f755888166fbb24802aa517f51d1d9223b47656e
generated: "2023-09-25T17:38:32.837147193-04:00"
2 changes: 1 addition & 1 deletion sdk/eventhub/Azure.Messaging.EventHubs/stress/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Stress tests for Event Hubs for .NET

dependencies:
- name: stress-test-addons
version: 0.2.0
version: ~0.3.0
repository: https://stresstestcharts.blob.core.windows.net/helm/

annotations:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
matrix:
scenarios:
consumer:
scenarioName: "Consumer"
parallel: 2
image: Dockerfile
imageBuildDir: "../../../.."
scenarioName: "Consumer"
eventprod:
scenarioName: "EventProd"
parallel: 2
image: Dockerfile
imageBuildDir: "../../../.."
scenarioName: "EventProd"
buffprod:
scenarioName: "BuffProd"
parallel: 2
image: Dockerfile
imageBuildDir: "../../../.."
scenarioName: "BuffProd"
burstbuffprod:
scenarioName: "BurstBuffProd"
image: Dockerfile
imageBuildDir: "../../../.."
scenarioName: "BurstBuffProd"
processor:
scenarioName: "Processor"
parallel: 3
image: Dockerfile
imageBuildDir: "../../../.."
scenarioName: "Processor"
Original file line number Diff line number Diff line change
@@ -1,47 +1,14 @@
{{- include "stress.deploy-job-template.from-job" (list . "stress.event-hubs-net") -}}
{{- include "stress-test-addons.deploy-job-template.from-pod" (list . "stress.event-hubs-net") -}}
{{- define "stress.event-hubs-net" -}}
metadata:
labels:
testName: "net-eh-stress-{{ lower .Stress.scenarioName }}"
testInstance: "eventhubs-{{ lower .Stress.scenarioName }}-{{ .Release.Name }}-{{ .Release.Revision }}"
spec:
{{ if eq .Stress.scenarioName "EventProd" }}
completions: 2
parallelism: 2
{{ end }}
{{ if eq .Stress.scenarioName "BuffProd" }}
completions: 2
parallelism: 2
{{ end }}
{{ if eq .Stress.scenarioName "Processor" }}
completions: 3
parallelism: 3
{{ end }}
{{ if eq .Stress.scenarioName "Consumer" }}
completions: 2
parallelism: 2
{{ end }}
completionMode: Indexed
template:
metadata:
labels:
testName: "net-eh-stress-{{ lower .Stress.scenarioName }}"
testInstance: "eventhubs-{{ lower .Stress.scenarioName }}-{{ .Release.Name }}-{{ .Release.Revision }}"
spec:
containers:
- name: role
image: {{ .Stress.imageTag }}
command: ['dotnet', "Azure.Messaging.EventHubs.Stress.dll", "--test", "{{ .Stress.scenarioName }}", "--role", "$(JOB_COMPLETION_INDEX)"]
imagePullPolicy: Always
{{- include "stress-test-addons.container-env" . | nindent 10 }}
containers:
- name: role
image: {{ .Stress.imageTag }}
command: ['dotnet', "Azure.Messaging.EventHubs.Stress.dll", "--test", "{{ .Stress.scenarioName }}", "--role", "$(JOB_COMPLETION_INDEX)"]
imagePullPolicy: Always
{{- include "stress-test-addons.container-env" . | nindent 6 }}
{{- end -}}

{{- define "stress.deploy-job-template.from-job" -}}
{{- $global := index . 0 -}}
{{- $jobOverrideDefinition := index . 1 -}}
# Configmap template that adds the stress test ARM template for mounting
{{- include "stress-test-addons.deploy-configmap" $global }}
{{- range (default (list "stress") $global.Values.scenarios) }}
---
{{ $jobCtx := fromYaml (include "stress-test-addons.util.mergeStressContext" (list $global . )) }}
{{- $jobOverride := fromYaml (include $jobOverrideDefinition $jobCtx) -}}
{{- $tpl := fromYaml (include "stress-test-addons.deploy-job-template.tpl" $jobCtx) -}}
{{- toYaml (merge $jobOverride $tpl) -}}
{{- end }}
{{- end -}}
6 changes: 3 additions & 3 deletions sdk/servicebus/Azure.Messaging.ServiceBus/stress/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: stress-test-addons
repository: https://stresstestcharts.blob.core.windows.net/helm/
version: 0.2.0
digest: sha256:53cbe4c0fed047f6c611523bd34181b21a310e7a3a21cb14f649bb09e4a77648
generated: "2022-10-28T12:40:54.5657204-07:00"
version: 0.3.0
digest: sha256:3e21a7fdf5d6b37e871a6dd9f755888166fbb24802aa517f51d1d9223b47656e
generated: "2023-09-25T21:42:38.685809722-04:00"
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Stress tests for Service Bus for .NET

dependencies:
- name: stress-test-addons
version: 0.2.0
version: ~0.3.0
repository: https://stresstestcharts.blob.core.windows.net/helm/

annotations:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
matrix:
scenarios:
sendrec:
scenarioName: "SendRec"
parallel: 2
image: Dockerfile
imageBuildDir: "../../../.."
scenarioName: "SendRec"
sendrecbatch:
scenarioName: "SendRecBatch"
parallel: 2
image: Dockerfile
imageBuildDir: "../../../.."
scenarioName: "SendRecBatch"
sesssendrec:
scenarioName: "SessionSendRec"
parallel: 2
image: Dockerfile
imageBuildDir: "../../../.."
scenarioName: "SessionSendRec"
sesssendproc:
scenarioName: "SessionSendProc"
parallel: 2
image: Dockerfile
imageBuildDir: "../../../.."
scenarioName: "SessionSendProc"
sendproc:
scenarioName: "SendProc"
parallel: 2
image: Dockerfile
imageBuildDir: "../../../.."
scenarioName: "SendProc"
Original file line number Diff line number Diff line change
@@ -1,33 +1,14 @@
{{- include "stress.deploy-job-template.from-job" (list . "stress.service-bus") -}}
{{- include "stress-test-addons.deploy-job-template.from-pod" (list . "stress.service-bus") -}}
{{- define "stress.service-bus" -}}
metadata:
labels:
testName: "net-sb-stress-{{ lower .Stress.scenarioName }}"
testInstance: "servicebus-{{ lower .Stress.scenarioName }}-{{ .Release.Name }}-{{ .Release.Revision }}"
spec:
completions: 2
parallelism: 2
completionMode: Indexed
template:
metadata:
labels:
testName: "net-sb-stress-{{ lower .Stress.scenarioName }}"
testInstance: "servicebus-{{ lower .Stress.scenarioName }}-{{ .Release.Name }}-{{ .Release.Revision }}"
spec:
containers:
- name: role
image: {{ .Stress.imageTag }}
command: ['dotnet', "Azure.Messaging.ServiceBus.Stress.dll", "--test", "{{ .Stress.scenarioName }}", "--role", "$(JOB_COMPLETION_INDEX)"]
imagePullPolicy: Always
{{- include "stress-test-addons.container-env" . | nindent 10 }}
containers:
- name: role
image: {{ .Stress.imageTag }}
command: ['dotnet', "Azure.Messaging.ServiceBus.Stress.dll", "--test", "{{ .Stress.scenarioName }}", "--role", "$(JOB_COMPLETION_INDEX)"]
imagePullPolicy: Always
{{- include "stress-test-addons.container-env" . | nindent 6 }}
{{- end -}}

{{- define "stress.deploy-job-template.from-job" -}}
{{- $global := index . 0 -}}
{{- $jobOverrideDefinition := index . 1 -}}
# Configmap template that adds the stress test ARM template for mounting
{{- include "stress-test-addons.deploy-configmap" $global }}
{{- range (default (list "stress") $global.Values.scenarios) }}
---
{{ $jobCtx := fromYaml (include "stress-test-addons.util.mergeStressContext" (list $global . )) }}
{{- $jobOverride := fromYaml (include $jobOverrideDefinition $jobCtx) -}}
{{- $tpl := fromYaml (include "stress-test-addons.deploy-job-template.tpl" $jobCtx) -}}
{{- toYaml (merge $jobOverride $tpl) -}}
{{- end }}
{{- end -}}

0 comments on commit ef86729

Please sign in to comment.