parent
dd58487030
commit
e5812ec72c
9
sdk/core/azure-core/test/libcurl-stress-test/.helmignore
Normal file
9
sdk/core/azure-core/test/libcurl-stress-test/.helmignore
Normal file
@ -0,0 +1,9 @@
|
||||
Dockerfile
|
||||
*.go
|
||||
*.bat
|
||||
*.txt
|
||||
*.ps1
|
||||
*.cpp
|
||||
*.md
|
||||
azure-core-libcurl-stress-test
|
||||
[Bb]in/
|
||||
@ -15,5 +15,5 @@ add_executable(
|
||||
target_link_libraries(azure-core-libcurl-stress-test PRIVATE azure-core)
|
||||
|
||||
create_map_file(azure-core-libcurl-stress-test azure-core-libcurl-stress-test.map)
|
||||
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/Dockerfile
|
||||
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/)
|
||||
file(COPY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/bin)
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
apiVersion: v2
|
||||
name: libcurl-stress-test
|
||||
description: An example of c++ stress test
|
||||
version: 0.0.1
|
||||
version: 0.0.2
|
||||
appVersion: v0.1
|
||||
annotations:
|
||||
stressTest: 'true' # enable auto-discovery of this test via `find-all-stress-packages.ps1`
|
||||
@ -12,5 +12,5 @@ annotations:
|
||||
|
||||
dependencies:
|
||||
- name: stress-test-addons
|
||||
version: 0.1.19
|
||||
version: ~0.2.0
|
||||
repository: https://stresstestcharts.blob.core.windows.net/helm/
|
||||
|
||||
@ -3,12 +3,9 @@
|
||||
|
||||
FROM mcr.microsoft.com/mirror/docker/library/ubuntu:22.04
|
||||
|
||||
ARG targetTest
|
||||
ARG build
|
||||
|
||||
# copy the tagrget binary
|
||||
ADD $targetTest ./$targetTest
|
||||
RUN chmod +x ./$targetTest
|
||||
COPY ./bin/libcurl-stress-test/azure-core-libcurl-stress-test ./azure-core-libcurl-stress-test
|
||||
RUN chmod +x ./azure-core-libcurl-stress-test
|
||||
|
||||
# install the mem check tool
|
||||
RUN apt-get update -y
|
||||
|
||||
2
sdk/core/azure-core/test/libcurl-stress-test/deploy.ps1
Normal file
2
sdk/core/azure-core/test/libcurl-stress-test/deploy.ps1
Normal file
@ -0,0 +1,2 @@
|
||||
Set-Location $PSScriptRoot
|
||||
pwsh "../../../../../eng/common/scripts/stress-testing/deploy-stress-tests.ps1" -Login -PushImages
|
||||
@ -0,0 +1,8 @@
|
||||
scenarios:
|
||||
- image: Dockerfile
|
||||
Scenario: cpp-constantDetach
|
||||
imageBuildDir: ./
|
||||
memory: 1.5Gi
|
||||
testTarget: azure-core-libcurl-stress-test
|
||||
imageTag: stresspgs7b6dif73rup6.azurecr.io/gearama/libcurl-stress-test/dockerfile:gearama
|
||||
|
||||
@ -44,11 +44,11 @@ void SendRequest(std::string target)
|
||||
|
||||
void Operation(int repetitions)
|
||||
{
|
||||
std::string base = "https://xyz.";
|
||||
std::string base = "https://bing.com.";
|
||||
for (int i = 0; i < repetitions; i++)
|
||||
{
|
||||
std::cout << i << std::endl;
|
||||
SendRequest(base + std::to_string(i) + ".abc");
|
||||
SendRequest(base); // + std::to_string(i) + ".abc");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,16 @@
|
||||
displayNames:
|
||||
# this makes it so these don't show up in the scenario names,
|
||||
# since they're just clutter.
|
||||
1.5Gi": ""
|
||||
4Gi": ""
|
||||
image: ""
|
||||
matrix:
|
||||
images:
|
||||
cpp:
|
||||
image: Dockerfile
|
||||
imageBuildDir: "./"
|
||||
scenarios:
|
||||
constantDetach:
|
||||
testTarget: azure-core-libcurl-stress-test
|
||||
memory: "1.5Gi"
|
||||
|
||||
@ -1,16 +1,27 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
// Dummy parameter to handle defaults the script passes in
|
||||
param testApplicationOid string = ''
|
||||
@description('The base resource name.')
|
||||
param baseName string = resourceGroup().name
|
||||
|
||||
resource config 'Microsoft.AppConfiguration/configurationStores@2020-07-01-preview' = {
|
||||
name: 'config-${resourceGroup().name}'
|
||||
location: resourceGroup().location
|
||||
@description('The client OID to grant access to test resources.')
|
||||
param testApplicationOid string
|
||||
|
||||
var apiVersion = '2017-04-01'
|
||||
// Uncomment this if you want to test against the southeastasia nodes.
|
||||
//var location = 'southeastasia'
|
||||
var location = resourceGroup().location
|
||||
var authorizationRuleName_var = '${baseName}/RootManageSharedAccessKey'
|
||||
var authorizationRuleNameNoManage_var = '${baseName}/NoManage'
|
||||
var serviceBusDataOwnerRoleId = '/subscriptions/${subscription().subscriptionId}/providers/Microsoft.Authorization/roleDefinitions/090c5cfd-751d-490a-894a-3ce6f1109419'
|
||||
|
||||
resource servicebus 'Microsoft.ServiceBus/namespaces@2018-01-01-preview' = {
|
||||
name: baseName
|
||||
location: location
|
||||
sku: {
|
||||
name: 'Standard'
|
||||
tier: 'Standard'
|
||||
}
|
||||
properties: {
|
||||
zoneRedundant: false
|
||||
}
|
||||
}
|
||||
|
||||
output RESOURCE_GROUP string = resourceGroup().name
|
||||
output AZURE_CLIENT_OID string = testApplicationOid
|
||||
output QUEUE_NAME_WITH_SESSIONS string = 'testQueueWithSessions'
|
||||
|
||||
@ -4,12 +4,11 @@
|
||||
{{- define "stress.deploy-example" -}}
|
||||
metadata:
|
||||
labels:
|
||||
testName: "libcurl-stress-test"
|
||||
name: "libcurl-stress-test"
|
||||
chaos: "{{ default false .Stress.chaos }}"
|
||||
spec:
|
||||
containers:
|
||||
- name: libcurl-stress-test
|
||||
image: stresspgs7b6dif73rup6.azurecr.io/azuresdkforcpp/curlstress:latest
|
||||
- name: main
|
||||
image: {{ .Stress.imageTag }}
|
||||
imagePullPolicy: Always
|
||||
command:
|
||||
[
|
||||
@ -19,4 +18,8 @@ spec:
|
||||
"./azure-core-libcurl-stress-test",
|
||||
]
|
||||
{{- include "stress-test-addons.container-env" . | nindent 6 }}
|
||||
resources:
|
||||
limits:
|
||||
memory: {{.Stress.memory }}
|
||||
cpu: "1"
|
||||
{{- end -}}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user