Exemplo n.º 1
0
        /// <summary>
        ///     Provides a standard frame for accumulating and reporting result of measurements, that are contained in the given
        ///     function
        /// </summary>
        /// <param name="function"></param>
        /// <param name="count"> The number of measured expressions in result, default is "null" for "no restricton. </param>
        /// <param name="hidden"> The relative amount of time that will be hidden in result, default is 0.1. </param>
        public static TResult Frame <TResult>(Func <TResult> function, int?count = null, double hidden = 0.1)
        {
            Reset();
            var result = _instance.InternalMeasure(function, "", 1);

            Tracer.FlaggedLine(Format(count, hidden));
            return(result);
        }
Exemplo n.º 2
0
 /// <summary>
 ///     Provides a standard frame for accumulating and reporting result of measurements, that are contained in the given
 ///     action
 /// </summary>
 /// <param name="action"></param>
 /// <param name="count"> The number of measured expressions in result, default is "null" for "no restricton. </param>
 /// <param name="hidden"> The relative amount of time that will be hidden in result, default is 0.1. </param>
 public static void Frame(Action action, int?count = null, double hidden = 0.1)
 {
     Reset();
     _instance.InternalMeasure(action, "", 1);
     Tracer.FlaggedLine(Format(count, hidden));
 }