void SummaryCounters(HttpContext context) { var stats = new PerformanceStats(); stats.Configure(); // Update the counters and get the list var counters = stats.Update(WaitTimeMs); var json = JsonConvert.SerializeObject(counters); context.Response.ContentType = "application/json"; context.Response.Write(json); }
private async Task<object> GetPerformanceStatusTaskAsync(HttpContext context) { var stats = new PerformanceStats(); stats.Configure(); var counters = stats.UpdateAsyncTask(WaitTimeMs); var json = JsonConvert.SerializeObject(counters); context.Response.ContentType = "application/json"; context.Response.Write(json); return null; }
private async Task <object> GetPerformanceStatusTaskAsync(HttpContext context) { var stats = new PerformanceStats(); stats.Configure(); var counters = await stats.UpdateAsyncTask(WaitTimeMs); var json = JsonConvert.SerializeObject(counters); context.Response.ContentType = "application/json"; context.Response.Write(json); return(null); }