diff --git a/src/BenchmarkDotNet/Running/BenchmarkRunnerClean.cs b/src/BenchmarkDotNet/Running/BenchmarkRunnerClean.cs index 66a1f3d7da..aad9626ef5 100644 --- a/src/BenchmarkDotNet/Running/BenchmarkRunnerClean.cs +++ b/src/BenchmarkDotNet/Running/BenchmarkRunnerClean.cs @@ -52,7 +52,7 @@ internal static Summary[] Run(BenchmarkRunInfo[] benchmarkRunInfos) { var compositeLogger = CreateCompositeLogger(benchmarkRunInfos, streamLogger); - compositeLogger.WriteLineInfo("// Validating benchmarks:"); + compositeLogger.WriteLineHeader("// ***** Validating benchmarks *****"); var (supportedBenchmarks, validationErrors) = GetSupportedBenchmarks(benchmarkRunInfos, resolver); @@ -68,7 +68,7 @@ internal static Summary[] Run(BenchmarkRunInfo[] benchmarkRunInfos) int totalBenchmarkCount = supportedBenchmarks.Sum(benchmarkInfo => benchmarkInfo.BenchmarksCases.Length); int benchmarksToRunCount = totalBenchmarkCount - (idToResume + 1); // ids are indexed from 0 - compositeLogger.WriteLineHeader("// ***** BenchmarkRunner: Start *****"); + compositeLogger.WriteLineHeader("// ***** BenchmarkRunner: Start *****"); compositeLogger.WriteLineHeader($"// ***** Found {totalBenchmarkCount} benchmark(s) in total *****"); var globalChronometer = Chronometer.Start(); @@ -267,7 +267,7 @@ private static void PrintSummary(ILogger logger, ImmutableConfig config, Summary { var cultureInfo = config.CultureInfo ?? DefaultCultureInfo.Instance; - logger.WriteLineHeader("// ***** BenchmarkRunner: Finish *****"); + logger.WriteLineHeader("// ***** BenchmarkRunner: Finish *****"); logger.WriteLine(); logger.WriteLineHeader("// * Export *"); @@ -352,7 +352,7 @@ private static ImmutableArray Validate(params BenchmarkRunInfo[ private static Dictionary BuildInParallel(ILogger logger, string rootArtifactsFolderPath, BuildPartition[] buildPartitions, in StartedClock globalChronometer) { - logger.WriteLineHeader($"// ***** Building {buildPartitions.Length} exe(s) in Parallel: Start *****"); + logger.WriteLineHeader($"// ***** Building {buildPartitions.Length} exe(s) in Parallel: Start *****"); var buildLogger = buildPartitions.Length == 1 ? logger : NullLogger.Instance; // when we have just one partition we can print to std out @@ -365,12 +365,12 @@ private static Dictionary BuildInParallel(ILogger l var afterParallelBuild = globalChronometer.GetElapsed(); - logger.WriteLineHeader($"// ***** Done, took {GetFormattedDifference(beforeParallelBuild, afterParallelBuild)} *****"); + logger.WriteLineHeader($"// ***** Done, took {GetFormattedDifference(beforeParallelBuild, afterParallelBuild)} *****"); if (buildPartitions.Length <= 1 || !buildResults.Values.Any(result => result.IsGenerateSuccess && !result.IsBuildSuccess)) return buildResults; - logger.WriteLineHeader("// ***** Failed to build in Parallel, switching to sequential build *****"); + logger.WriteLineHeader("// ***** Failed to build in Parallel, switching to sequential build *****"); foreach (var buildPartition in buildPartitions) if (buildResults[buildPartition].IsGenerateSuccess && !buildResults[buildPartition].IsBuildSuccess && !buildResults[buildPartition].TryToExplainFailureReason(out string _)) @@ -378,7 +378,7 @@ private static Dictionary BuildInParallel(ILogger l var afterSequentialBuild = globalChronometer.GetElapsed(); - logger.WriteLineHeader($"// ***** Done, took {GetFormattedDifference(afterParallelBuild, afterSequentialBuild)} *****"); + logger.WriteLineHeader($"// ***** Done, took {GetFormattedDifference(afterParallelBuild, afterSequentialBuild)} *****"); return buildResults; @@ -692,7 +692,7 @@ private static void PrintValidationErrors(ILogger logger, IEnumerable Validate(ValidationParameters validationPara yield return new ValidationError( TreatsWarningsAsErrors, $"Assembly {group.Key.GetName().Name} which defines benchmarks references non-optimized {referencedAssemblyName.Name}" + - $"{Environment.NewLine}\tIf you own this dependency, please, build it in RELEASE." + - $"{Environment.NewLine}\tIf you don't, you can disable this policy by using 'config.WithOptions(ConfigOptions.DisableOptimizationsValidator)'."); + $"{Environment.NewLine} If you own this dependency, please, build it in RELEASE." + + $"{Environment.NewLine} If you don't, you can disable this policy by using 'config.WithOptions(ConfigOptions.DisableOptimizationsValidator)'."); } } @@ -40,14 +40,14 @@ public IEnumerable Validate(ValidationParameters validationPara { yield return new ValidationError( TreatsWarningsAsErrors, - $"Assembly {group.Key.GetName().Name} which defines benchmarks is non-optimized" + Environment.NewLine + - "Benchmark was built without optimization enabled (most probably a DEBUG configuration). Please, build it in RELEASE." + Environment.NewLine + - "If you want to debug the benchmarks, please see https://benchmarkdotnet.org/articles/guides/troubleshooting.html#debugging-benchmarks." + $"Assembly {group.Key.GetName().Name} which defines benchmarks is non-optimized" + + $"{Environment.NewLine} Benchmark was built without optimization enabled (most probably a DEBUG configuration). Please, build it in RELEASE." + + $"{Environment.NewLine} If you want to debug the benchmarks, please see https://benchmarkdotnet.org/articles/guides/troubleshooting.html#debugging-benchmarks." + (group.Key.IsLinqPad() - ? Environment.NewLine + "Please enable optimizations in your LINQPad. Go to Preferences -> Query and select \"compile with /optimize+\"" + ? $"{Environment.NewLine} Please enable optimizations in your LINQPad. Go to Preferences -> Query and select \"compile with /optimize+\"" : string.Empty)); } } } } -} +} \ No newline at end of file