/// <summary> /// /// </summary> /// <param name="index"></param> /// <param name="item"></param> public void Insert(int index, ApiLogger item) { this.InnerList.Insert(index, item); }
/// <summary> /// /// </summary> /// <param name="item"></param> public void Remove(ApiLogger item) { this.InnerList.Remove(item); }
/// <summary> /// /// </summary> /// <param name="item"></param> /// <returns></returns> public bool Contains(ApiLogger item) { return(this.InnerList.Contains(item)); }
/// <summary> /// /// </summary> /// <param name="item"></param> /// <returns></returns> public int IndexOf(ApiLogger item) { return(this.InnerList.IndexOf(item)); }
public static void Init(Form1 app, string token, ApiLogger logger) { eBayApi.app = app; eBayApi.token = token; eBayApi.logger = logger; }
/// <summary> /// /// </summary> /// <param name="item"></param> /// <returns></returns> public int Add(ApiLogger item) { return(this.InnerList.Add(item)); }
/// <summary> /// /// </summary> /// <param name="items">An array of loggers to log to of type <see cref="ApiLogger"/>.</param> public ApiLoggerCollection(ApiLogger[] items) { this.AddRange(items); }
/// <summary> /// /// </summary> /// <param name="items"></param> /// <param name="index"></param> public void CopyTo(ApiLogger[] items, int index) { this.InnerList.CopyTo(items, index); }
/// <summary> /// /// </summary> /// <param name="item"></param> /// <returns></returns> public int IndexOf(ApiLogger item) { return this.InnerList.IndexOf(item); }
/// <summary> /// /// </summary> /// <param name="item"></param> /// <returns></returns> public bool Contains(ApiLogger item) { return this.InnerList.Contains(item); }
/// <summary> /// /// </summary> /// <param name="items"></param> public void AddRange(ApiLogger[] items) { this.InnerList.AddRange(items); }
/// <summary> /// /// </summary> /// <param name="item"></param> /// <returns></returns> public int Add(ApiLogger item) { return this.InnerList.Add(item); }
/// <summary> /// /// </summary> /// <param name="callname"></param> /// <param name="logger"></param> /// <param name="metricsList"></param> private void GenerateReportPerCallname(string callname, ApiLogger logger, ArrayList metricsList) { mLogger = logger; Log("Call name: " + callname); Log("Number of calls recorded: " + metricsList.Count); Log("Total Setup Network Server Finish Start Time "); Log("======================================================================"); for (int i = 0; i < metricsList.Count; i++) { CallMetricsEntry metrics = (CallMetricsEntry) metricsList[i]; metrics.GenerateReport(logger); } string avgstring = ""; if (metricsList.Count > 0) { long[] averages = GenerateAverage(metricsList); for (int i = 0; i<averages.Length; i++) { avgstring += CallMetricsEntry.FormatNumber(averages[i]); } } Log("Average : "); Log(avgstring); Log("======================================================================"); }
/// <summary> /// /// </summary> public void GenerateReport(ApiLogger logger) { ICollection keyCollection = mMetricsTable.Keys; foreach (string callname in keyCollection) { ArrayList metricsList = (ArrayList) mMetricsTable[callname]; GenerateReportPerCallname(callname, logger, metricsList); } }
/// <summary> /// Generates the call metrics information about the API call that was made. /// </summary> public void GenerateReport(ApiLogger logger) { // logger.RecordMessage(FormatMsec(mApiCallStarted) + // FormatMsec(mNetworkSendStarted) + // FormatNumber(ServerProcessingTime > 0? ServerProcessingTime: -1) + // FormatMsec(mNetworkReceiveEnded) + // FormatMsec(mApiCallEnded) + // FormatString(ApiCallStarted.ToString("yyyy'-'MM'-'dd HH':'mm':'ss'.'fff"), 25), // MessageSeverity.Informational); logger.RecordMessage(FormatNumber(TurnaroundTime) + FormatNumber(CallInitTime) + FormatNumber(NetworkTime) + FormatNumber(ServerProcessingTime > 0? ServerProcessingTime: -1) + FormatNumber(CallFinishTime) + FormatString(ApiCallStarted.ToString("yyyy'-'MM'-'dd HH':'mm':'ss'.'fff"), 25), MessageSeverity.Informational); }