Exemplo n.º 1
0
        public Dictionary <string, object>[] get_sessions()
        {
            return(_history.RecentReports().Where(x => x.RootChain != null).Select(report =>
            {
                var dict = new Dictionary <string, object>();

                dict.Add("chain", report.RootChain.Title());
                dict.Add("time", report.Time);
                dict.Add("hash", report.RootChain.Title().GetHashCode());
                dict.Add("execution_time", report.ExecutionTime);
                dict.Add("request", report.Id);

                var requestCount = report.Steps.Count(x => x.Log is CommandExecuted);

                dict.Add("request_count", requestCount);


                return dict;
            }).ToArray());
        }
Exemplo n.º 2
0
        public HttpRequestSummaryItems get_requests()
        {
            var logs = _history.RecentReports().Where(x => x.RootChain is RoutedChain).OrderByDescending(x => x.Time);

            return(new HttpRequestSummaryItems(logs));
        }