Beispiel #1
0
 /// <summary>
 /// Initializes new instance of this type.
 /// </summary>
 /// <param name="name">The measurement name.</param>
 /// <param name="options">The measurement options.</param>
 /// <param name="operationCount">The operation count.</param>
 public Measurement(string name, MeasurementOptions options, int operationCount)
 {
     this.options        = options;
     this.operationCount = operationCount;
     Name = name;
     if ((options & MeasurementOptions.LogEnter) > 0)
     {
         CoreLog.Info("Measurement: Enter {0}.", FullName);
     }
     initialBytesAllocated = GC.GetTotalMemory((options & MeasurementOptions.CollectGarbageOnEnter) > 0);
     initialTime           = HighResolutionTime.Now;
 }
Beispiel #2
0
 /// <summary>
 /// Initializes new instance of this type.
 /// </summary>
 /// <param name="options">The measurement options.</param>
 /// <param name="operationCount">The operation count.</param>
 public Measurement(MeasurementOptions options, int operationCount)
     : this("Unnamed", options, operationCount)
 {
 }
Beispiel #3
0
 /// <summary>
 /// Initializes new instance of this type.
 /// </summary>
 /// <param name="name">The measurement name.</param>
 /// <param name="options">The measurement options.</param>
 public Measurement(string name, MeasurementOptions options)
     : this(name, options, 0)
 {
 }
Beispiel #4
0
 /// <summary>
 /// Initializes new instance of this type.
 /// </summary>
 /// <param name="options">The measurement options.</param>
 public Measurement(MeasurementOptions options)
     : this("Unnamed", options)
 {
 }