Пример #1
0
		public override void GetReportData(out ProfileReportCounterData data, ProfileReportOptions options)
		{
			data = new ProfileReportCounterData();
			data.Severity = 0.5f;
			
			if ((options & ProfileReportOptions.LastValue) != ProfileReportOptions.None)
				data.LastValue = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}", this.lastValue);

			if (this.IsSingleValue)
			{
				if ((options & ProfileReportOptions.AverageValue) != ProfileReportOptions.None)
					data.AverageValue = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}", this.lastValue);
			}
			else
			{
				if ((options & ProfileReportOptions.AverageValue) != ProfileReportOptions.None)
					data.AverageValue = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}", (int)Math.Round((double)this.accumValue / (double)this.sampleCount));
				if ((options & ProfileReportOptions.MinValue) != ProfileReportOptions.None)
					data.MinValue = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}", this.accumMinValue);
				if ((options & ProfileReportOptions.MaxValue) != ProfileReportOptions.None)
					data.MaxValue = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}", this.accumMaxValue);
				if ((options & ProfileReportOptions.SampleCount) != ProfileReportOptions.None)
					data.SampleCount = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}", this.sampleCount);
			}
		}
Пример #2
0
 public override void GetReportData(out ProfileReportCounterData data)
 {
     data           = new ProfileReportCounterData();
     data.Severity  = MathF.Clamp(this.lastValue / Time.MsPFMult, 0.0f, 1.0f);
     data.LastValue = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0:F}", this.lastValue);
     if (this.IsSingleValue)
     {
         data.AverageValue = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0:F}", this.lastValue);
     }
     else
     {
         if (this.sampleCount > 0)
         {
             data.AverageValue = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0:F}", (float)(this.accumValue / (double)this.sampleCount));
             data.MinValue     = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0:F}", this.accumMinValue);
             data.MaxValue     = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0:F}", this.accumMaxValue);
         }
         data.SampleCount = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}", this.sampleCount);
     }
 }
Пример #3
0
 public override void GetReportData(out ProfileReportCounterData data)
 {
     data           = new ProfileReportCounterData();
     data.Severity  = 0.5f;
     data.LastValue = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}", this.lastValue);
     if (this.IsSingleValue)
     {
         data.AverageValue = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}", this.lastValue);
     }
     else
     {
         if (this.sampleCount > 0)
         {
             data.AverageValue = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}", (int)Math.Round((double)this.accumValue / (double)this.sampleCount));
             data.MinValue     = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}", this.accumMinValue);
             data.MaxValue     = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}", this.accumMaxValue);
         }
         data.SampleCount = string.Format(System.Globalization.CultureInfo.InvariantCulture, "{0}", this.sampleCount);
     }
 }
Пример #4
0
		/// <summary>
		/// Gathers ProfileCounter data for generating a profile report.
		/// </summary>
		/// <param name="data"></param>
		/// <param name="options"></param>
		public abstract void GetReportData(out ProfileReportCounterData data, ProfileReportOptions options);
Пример #5
0
 /// <summary>
 /// Gathers ProfileCounter data for generating a profile report.
 /// </summary>
 /// <param name="data"></param>
 /// <param name="options"></param>
 public abstract void GetReportData(out ProfileReportCounterData data, ProfileReportOptions options);
Пример #6
0
 /// <summary>
 /// Gathers ProfileCounter data for generating a profile report.
 /// </summary>
 public abstract void GetReportData(out ProfileReportCounterData data);