Skip to content

Commit

Permalink
Warn user if no Columns were defined, fixes #159
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsitnik committed Apr 2, 2017
1 parent 97c2110 commit ba972bb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/BenchmarkDotNet.Core/Exporters/CompositeExporter.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using BenchmarkDotNet.Extensions;
using BenchmarkDotNet.Loggers;
using BenchmarkDotNet.Reports;

Expand Down Expand Up @@ -36,6 +37,9 @@ public CompositeExporter(params IExporter[] exporters)

public void ExportToLog(Summary summary, ILogger logger)
{
if(summary.GetColumns().IsNullOrEmpty())
logger.WriteLineHint("You haven't configured any columns, your results will be empty");

foreach (var exporter in exporters)
exporter.ExportToLog(summary, logger);
}
Expand Down

0 comments on commit ba972bb

Please sign in to comment.