예제 #1
0
        public void Add_EntryWithTimespanGreaterThanEpsilon_AddsEntry()
        {
            _methodProfilingResults.Add("A", new TimeSpan(0, 0, 0, 0, 10));
            bool entryAdded = _methodProfilingResults.ToString().Contains("0,01 s: A");

            Assert.That(entryAdded, Is.True);
        }
예제 #2
0
        private void CheckMembers(TypeNode type)
        {
            foreach (Member member in type.Members)
            {
                if (member is Method)
                {
                    var method            = (Method)member;
                    var fragmentSignature = GetFragmentSignatureFromConfiguration(type, method);

                    if (!FragmentUtility.IsFragmentGenerator(method) &&
                        (fragmentSignature == null || !fragmentSignature.IsGenerator))
                    {
                        Stopwatch stopwatch = new Stopwatch();
                        stopwatch.Start();
                        Parse(method);
                        stopwatch.Stop();
                        _methodProfilingResults.Add(method.FullName, stopwatch.Elapsed);
                    }
                }
            }
        }