Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/libraries/System.Net.Http/tests/StressTests/HttpStress/Readme.md')
-rw-r--r--src/libraries/System.Net.Http/tests/StressTests/HttpStress/Readme.md85
1 files changed, 21 insertions, 64 deletions
diff --git a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Readme.md b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Readme.md
index f5ce26498ab..b54efaecb73 100644
--- a/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Readme.md
+++ b/src/libraries/System.Net.Http/tests/StressTests/HttpStress/Readme.md
@@ -1,6 +1,6 @@
## HttpStress
-Provides stress testing scenaria for System.Net.HttpClient, with emphasis on the HTTP/2 implementation of SocketsHttpHandler.
+Provides stress testing scenaria for System.Net.Http.HttpClient, with emphasis on the HTTP/2 implementation of SocketsHttpHandler.
### Running the suite locally
@@ -18,82 +18,39 @@ $ dotnet run -- -help
### Running with local runtime builds
-Note that the stress suite will test the sdk build available in the available,
+Note that the stress suite will test the sdk available in the environment,
that is to say it will not necessarily test the implementation of the local runtime repo.
To achieve this, you will need to point your environment to the [`testhost` build](https://github.com/dotnet/runtime/blob/master/docs/coreclr/building/testing-with-corefx.md).
-Using powershell on windows:
+### Running using docker-compose
-```powershell
-# Build runtime libraries from source
-PS> .\libraries.sh -c Release
-# Load the testhost sdk in the current environment, must match build configuration
-PS> . .\src\libraries\System.Net.Http\tests\StressTests\HttpStress\load-corefx-testhost.ps1 -c Release
-# run the stress suite with the new bits
-PS> cd .\src\libraries\System.Net.Http\tests\StressTests\HttpStress ; dotnet run -c Release -- <stress args>
-```
-
-Equivalently using bash on linux:
-
-```bash
-# Build runtime libraries from source
-$ ./libraries.sh -c Release
-# Load the testhost sdk in the current environment, must match build configuration
-$ source src/libraries/System.Net.Http/tests/StressTests/HttpStress/load-corefx-testhost.sh -c Release
-# run the stress suite with the new bits
-$ cd src/libraries/System.Net.Http/tests/StressTests/HttpStress && dotnet run -- <stress args>
-```
+The prefered way of running the stress suite is using docker-compose,
+which can be used to target both linux and windows containers.
+Docker and compose-compose are required for this step (both included in [docker for windows](https://docs.docker.com/docker-for-windows/)).
-### Running with docker
+#### Using Linux containers
-To run the stress suite in docker:
+From the stress folder on powershell:
-```bash
-$ cd src/libraries/System.Net.Http/tests/StressTests/HttpStress
-$ docker build -t httpstress .
-$ docker run --rm httpstress
+```powershell
+PS> .\run-docker-compose.ps1 -b
```
-This will build the stress suite using the `mcr.microsoft.com/dotnet/core/sdk` base image,
-however that can be overriden using the `SDK_BASE_IMAGE` build argument:
+This will build libraries and stress suite to a linux docker image and initialize a stress run using docker-compose.
-```bash
-$ docker build -t httpstress \
- --build-arg SDK_BASE_IMAGE=my-sdk-3.1.100-preview1 \
- .
-```
+#### Using Windows containers
-This should work with any base image with a dotnet sdk supporting `netcoreapp3.0`.
+Before we get started, please see
+[docker documentation](https://docs.docker.com/docker-for-windows/#switch-between-windows-and-linux-containers)
+on how windows containers can be enabled on your machine.
+Once ready, simply run:
-#### Using runtime bits
-
-To containerize httpstress using current runtime source code, from the root of the runtime repo do:
-```bash
-$ docker build -t sdk-corefx-current \
- --build-arg BUILD_CONFIGURATION=Debug \
- -f src/libraries/System.Net.Http/tests/StressTests/HttpStress/corefx.Dockerfile \
- .
-```
-Then as before build the stress suite using the image we just built as our base image:
-```bash
-$ cd src/libraries/System.Net.Http/tests/StressTests/HttpStress/
-$ docker build -t httpstress \
- --build-arg SDK_BASE_IMAGE=sdk-corefx-current \
- .
+```powershell
+PS> .\run-docker-compose.ps1 -b -w
```
-### Orchestrating with docker-compose
+For more details on how the `run-docker-compose.ps1` script can be used:
-Once the httpstress image has been built successfully,
-it is possible to orchestrate stress runs with client and server deployed to separate containers
-using docker-compose.
-To do this, from the stress folder simply run
-```bash
-$ docker-compose up
-```
-Parameters of the stress run can be tuned by setting environment variables:
-```bash
-$ export HTTPSTRESS_CLIENT_ARGS='-maxExecutionTime 20'
-$ export HTTPSTRESS_SERVER_ARGS='-aspnetlog'
-$ docker-compose up
+```powershell
+Get-Help .\run-docker-compose.ps1
```