Ejemplo n.º 1
0
        public static Stopwatch MethodEntered(params object[] args)
        {
#if DEBUG
            var t = new StackFrame(1, true);
            Log.d(" --> " + t.GetMethodName(false), t.AddTo(args));
#endif
            return(AssertV2.TrackTiming());
        }
Ejemplo n.º 2
0
        public static void MethodDone(Stopwatch timing, int maxAllowedTimeInMs = -1)
        {
            timing.Stop();
            var t = new StackFrame(1, true);

            Log.d("    <-- " + t.GetMethodName(false) + " finished after " + timing.ElapsedMilliseconds + " ms", t.AddTo(null));
            if (maxAllowedTimeInMs > 0)
            {
                timing.AssertUnderXms(maxAllowedTimeInMs);
            }
        }