コード例 #1
0
        public static ActiveMeasuring CreateBenchmark(this BenchmarkSection section, string name)
        {
            var fullName = name;

            if (section?.Prefix != null)
            {
                fullName = $"{section.Prefix ?? string.Empty}.{fullName}";
            }

            return(new ActiveMeasuring(section?.Benchmarks, fullName));
        }
コード例 #2
0
        public static BenchmarkSection CreateSection(this BenchmarkSection section, string name)
        {
            if (section == null)
            {
                return(null);
            }

            var fullName = name;

            if (section.Prefix != null)
            {
                fullName = $"{section.Prefix}.{fullName}";
            }

            return(new BenchmarkSection(section.Benchmarks, fullName));
        }