public static async Task SSASTestingPerf( [OrchestrationTrigger] IDurableOrchestrationContext context) { TestingBody body = context.GetInput <TestingBody>(); await context.CallActivityAsync("SSASTestingPerf_Activity", (body, "Query1")); await context.CallActivityAsync("SSASTestingPerf_Activity", (body, "Query2")); await context.CallActivityAsync("SSASTestingPerf_Activity", (body, "Query3")); }
public static async Task SSASTestingConcurrency( [OrchestrationTrigger] IDurableOrchestrationContext context) { TestingBody body = context.GetInput <TestingBody>(); List <Task> t = new List <Task>(); for (var i = 1; i <= body.nbConcurrentQuery; i++) { var newBody = new TestingBody { dbName = body.dbName , query = body.query.Replace("{id}", i.ToString()) , scope = body.scope , serverName = body.serverName , testId = body.testId }; t.Add(context.CallActivityAsync("SSASTestingPerf_Activity", (newBody, $"Query{i}"))); } await Task.WhenAll(t); }