public void ProcessEntry(HttpLogEntry entry) { //check the status code of the log if (entry.StatusCode == desiredStatusCode) { _numStatus++; } }
//In this method we will peform computations to find session lengths public void ProcessEntry(HttpLogEntry entry) { Dictionary<string, string> cookies = entry.Cookies; if (cookies != null) { string sessionID = ""; if (cookies.TryGetValue(CookieParser.WA_WEBSITE_SID, out sessionID)) { Organize(sessionID, entry.UTCLogDateTime); } } }
//the requirements are data fields that are needed from the log files //public List<AnalyticsDataLayer.LogFields> MetricRequirements { get; set; } /// <summary> /// At the api controller level, time is already considered, now with the filtered logs dependent on the time the user specefied, perform the metric jobs /// for these log entries /// </summary> /// <param name="entry"></param> /// public void ProcessEntry(HttpLogEntry entry) { if (entry.Cookies == null || entry.Cookies.Count == 0) { return; } //http://localhost:12553/diagnostics/analytics/getsessioncount?startTime=06/19/2013&endTime=06/20/2013&timeInterval=1:00 //be sure to check if the cookies are empty. Some log files may not have cookies Dictionary<string,string> cookies = entry.Cookies; if (cookies != null) { string sessionID = ""; if (cookies.TryGetValue(CookieParser.WA_WEBSITE_SID, out sessionID)) { AddSession(sessionID); } } }
public void ProcessEntry(HttpLogEntry entry) { total += entry.TimeTaken; count++; }