- Create a new HTTP trigger named LoadTestHttpTrigger with Authorization Level set to Anonymous.
- Replace the default code with the following in run.csx:
using System.Net; public static async Task<HttpResponseMessage> Run(HttpRequestMessage req, TraceWriter log) { System.Threading.Thread.Sleep(2000); return req.CreateResponse(HttpStatusCode.OK, "Hello "); }
- The preceding code is self-explainable. In order to make the load test interesting, let's simulate some processing load by adding a wait time of two seconds using System.Threading.Thread.Sleep(2000);.
- Copy the function URL by clicking on the </> Get function URL link available on the right-hand side of the run.csx code editor, as shown in the following screenshot: