I am trying to stress test my Endpoint which works with dapper that calls procedure and has a lot of validation. Idea is to know how it can handle like 1000 API calls that was sent at the same time.
Note that it is Get Endpoint
Any idea?
I tried using thread pool, but it would not run 1000 of them at the same time, also I thought about Task but it was same here, also for loop is not option with tasks or anything else, because there still will be the time difference between each method run.
ThreadPool.SetMinThreads(1000, 10), and see if it makes any difference.int numberOfCalls = 1000; List<Task> tasks = new List<Task>(); for (int i = 0; i < numberOfCalls; i++) { // Create a new task and add it to the list tasks.Add(SendApiCallAsync()); } // Wait for all tasks to complete await Task.WhenAll(tasks);