diff --git a/api-test/load-test/k6-load-test.js b/api-test/load-test/k6-load-test.js new file mode 100644 index 0000000..887c43c --- /dev/null +++ b/api-test/load-test/k6-load-test.js @@ -0,0 +1,12 @@ +import http from 'k6/http'; +import {sleep} from 'k6'; + +export const options = { + vus: 5000, + duration: '10s', +}; + +export default function() { + http.get('https://localhost:5001/api/bigstring'); + sleep(1); +} \ No newline at end of file diff --git a/api-test/unit-test/memory-leak-apis.http b/api-test/unit-test/memory-leak-apis.http new file mode 100644 index 0000000..3cd98f3 --- /dev/null +++ b/api-test/unit-test/memory-leak-apis.http @@ -0,0 +1,20 @@ +# For more info on HTTP files go to https://aka.ms/vs/httpfile +@hostAddress=https://localhost:5001 + +GET {{hostAddress}}/api/bigstring +### + +GET {{hostAddress}}/api/staticstring +### + +GET {{hostAddress}}/api/loh/200000 +### + +GET {{hostAddress}}/api/httpclient1?url=https%3A%2F%2Fgithub.com%2F +### + +GET {{hostAddress}}/api/httpclient2?url=https%3A%2F%2Fgithub.com%2F +### + +GET {{hostAddress}}/api/array/2000000 +### \ No newline at end of file diff --git a/src/MemoryLeak/MemoryLeak/MemoryLeak.csproj b/src/MemoryLeak/MemoryLeak/MemoryLeak.csproj index b0bf919..c23ca21 100644 --- a/src/MemoryLeak/MemoryLeak/MemoryLeak.csproj +++ b/src/MemoryLeak/MemoryLeak/MemoryLeak.csproj @@ -1,7 +1,7 @@ - net5.0 + net8.0 true diff --git a/src/MemoryLeak/MemoryLeak/Pages/Index.cshtml b/src/MemoryLeak/MemoryLeak/Pages/Index.cshtml index 20e25b4..e1b5e6c 100644 --- a/src/MemoryLeak/MemoryLeak/Pages/Index.cshtml +++ b/src/MemoryLeak/MemoryLeak/Pages/Index.cshtml @@ -37,7 +37,7 @@

- +