public static IEnumerable <TimeAnalyzeModel> AnalyzeTime() { var Commands = CmdRec.RecentCmds(AnalyzeHours); return(Commands.GroupBy(c => c.Time.Hour).Select(c => new TimeAnalyzeModel() { Hour = c.Key, CommandCount = c.Count() }).ToList()); }
public static IEnumerable <CommandAnalyzeModel> AnalyzeCommand() { var Commands = CmdRec.RecentCmds(AnalyzeHours); return(Commands.GroupBy(c => c.Command).Select(c => new CommandAnalyzeModel() { Command = c.Key, CommandCount = c.Count() }).OrderByDescending(c => c.CommandCount).Take(10).ToList()); }
public static IEnumerable <AIAnalyzeModel> AnalyzeAI() { var Commands = CmdRec.RecentCmds(AnalyzeHours); return(Commands.GroupBy(c => c.FunctionalAi).Select(c => new AIAnalyzeModel() { AIName = c.Key, CommandCount = c.Count() }).OrderByDescending(c => c.CommandCount).Take(10).ToList()); }