I have created these two actions:
public string Sync()
{
Thread.Sleep(2000);
return "Hello, Sync!";
}
public async Task<string> Async()
{
await Task.Delay(2000);
return "Hello, Async!";
}
and I hosted them under IIS (Windows 10). I created load tests with Visual Studio 2015 Ultimate with local environment as a laboratory. I'm testing with constant pattern with 100 virtual users.
My expectations are that the async action will have better results (more tests run and better average page response time) when number of threads for application pool is less then 100. But I get the same results for both tests. Both tests are set to run for 1 minutes.
I tried modifying plenty of options. In aspnet.config I set the following settings:
I tried setting to 8, 12, 100, always same results for both sync and async methods:
17 seconds average page time Total tests: 289 4.82 Tests/Sec
Any ideas what I am doing wrong? I'm expecting the async method to have 2 seconds average page time, since no threads should be blocked.