Exemplo n.º 1
0
        public static void Benchmark(params Action[] fn)
        {
            if (!FiTechCoreExtensions.EnableBenchMarkers)
            {
                fn.ForEach(a => a?.Invoke());
                return;
            }
            Benchmarker bm = new Benchmarker();
            var         i  = 0;

            foreach (var a in fn)
            {
                bm.Mark($"{++i}");
                a?.Invoke();
            }
            bm.FinalMark();
        }