public StatisticsGroup GetData() { StatisticsGroup result = new StatisticsGroup(this); result.Server = Server; result.Url = Url; result.Other = OtherStatus.GetData(); result._1xx = Status_1xx.GetData(); result._2xx = Status_2xx.GetData(); result._3xx = Status_3xx.GetData(); result._4xx = Status_4xx.GetData(); result._5xx = Status_5xx.GetData(); result.All = All.GetData(); return(result); }
public void Add(int code, long time) { All.Add(time); if (code >= 100 && code < 200) { Status_1xx.Add(time); } else if (code >= 200 && code < 300) { Status_2xx.Add(time); } else if (code >= 300 && code < 400) { Status_3xx.Add(time); } else if (code >= 400 && code < 500) { Status_4xx.Add(time); } else if (code >= 500 && code < 600) { Status_5xx.Add(time); } else { OtherStatus.Add(time); } if (code >= 700) { GetSubstats(700).Add(time); } else { GetSubstats(code).Add(time); } for (int i = 0; i < Times.Count; i++) { var t = Times[i]; if (t.Match((int)time)) { t.Add(); } } }
public StatisticsData GetData() { StatisticsData result = mData; result.Server = Server; result.Url = Url; result.Other = OtherStatus.GetData(); result._1xx = Status_1xx.GetData(); result._2xx = Status_2xx.GetData(); result._3xx = Status_3xx.GetData(); result._4xx = Status_4xx.GetData(); result._5xx = Status_5xx.GetData(); result.All = All.GetData(); for (int i = 0; i < Times.Count; i++) { result.Times[i] = Times[i].GetData(); } return(result); }
public StatisticsGroup GetData() { StatisticsGroup result = new StatisticsGroup(); result.Url = Name; result.Items.Add(OtherStatus.GetData()); result.Items.Add(Status_1xx.GetData()); result.Items.Add(Status_2xx.GetData()); result.Items.Add(Status_3xx.GetData()); result.Items.Add(Status_4xx.GetData()); result.Items.Add(Status_5xx.GetData()); result.Items.Add(All.GetData()); foreach (var item in CodeStatistics) { if (item.Count > 0) { result.Items.Add(item.GetData()); } } return(result); }
public void Add(int code, long time) { All.Add(time); if (code >= 100 && code < 200) { Status_1xx.Add(time); } else if (code >= 200 && code < 300) { Status_2xx.Add(time); } else if (code >= 300 && code < 400) { Status_3xx.Add(time); } else if (code >= 400 && code < 500) { Status_4xx.Add(time); } else if (code >= 500 && code < 600) { Status_5xx.Add(time); } else { OtherStatus.Add(time); } if (code >= 1024) { CodeStatistics[1023].Add(time); } else { CodeStatistics[code].Add(time); } }