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);
        }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 4
0
        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);
        }