示例#1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="index"></param>
 /// <param name="item"></param>
 public void Insert(int index, ApiLogger item)
 {
     this.InnerList.Insert(index, item);
 }
示例#2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="item"></param>
 public void Remove(ApiLogger item)
 {
     this.InnerList.Remove(item);
 }
示例#3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="item"></param>
 /// <returns></returns>
 public bool Contains(ApiLogger item)
 {
     return(this.InnerList.Contains(item));
 }
示例#4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="item"></param>
 /// <returns></returns>
 public int IndexOf(ApiLogger item)
 {
     return(this.InnerList.IndexOf(item));
 }
示例#5
0
		public static void Init(Form1 app, string token, ApiLogger logger) 
		{
			eBayApi.app = app;
			eBayApi.token = token;
			eBayApi.logger = logger;
		}
示例#6
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="item"></param>
 /// <returns></returns>
 public int Add(ApiLogger item)
 {
     return(this.InnerList.Add(item));
 }
示例#7
0
		/// <summary>
		/// 
		/// </summary>
		/// <param name="index"></param>
		/// <param name="item"></param>
		public void Insert(int index, ApiLogger item) 
		{
			this.InnerList.Insert(index, item);
		}
示例#8
0
		/// <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);
		}
示例#9
0
		/// <summary>
		/// 
		/// </summary>
		/// <param name="items"></param>
		/// <param name="index"></param>
		public void CopyTo(ApiLogger[] items, int index) 
		{
			this.InnerList.CopyTo(items, index);
		}
示例#10
0
		/// <summary>
		/// 
		/// </summary>
		/// <param name="item"></param>
		/// <returns></returns>
		public int IndexOf(ApiLogger item) 
		{
			return this.InnerList.IndexOf(item);
		}
示例#11
0
		/// <summary>
		/// 
		/// </summary>
		/// <param name="item"></param>
		/// <returns></returns>
		public bool Contains(ApiLogger item) 
		{
			return this.InnerList.Contains(item);
		}
示例#12
0
		/// <summary>
		/// 
		/// </summary>
		/// <param name="items"></param>
		public void AddRange(ApiLogger[] items) 
		{
			this.InnerList.AddRange(items);
		}
示例#13
0
		/// <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("======================================================================");
		}
示例#15
0
		/// <summary>
		/// 
		/// </summary>
		/// <param name="item"></param>
		public void Remove(ApiLogger item) 
		{
			this.InnerList.Remove(item);
		}
        /// <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);
		}