-
-
Notifications
You must be signed in to change notification settings - Fork 983
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve appearance of validation output #2179
base: master
Are you sure you want to change the base?
Conversation
We use double slashes to distinguish user messages from the payload (the results of the measurements). |
Yes, if we remove the first line or pass the BenchmarkDotNet/src/BenchmarkDotNet/Loggers/Broker.cs Lines 45 to 51 in 3906381
But how can we distinguish user input from
|
/// <summary> | |
/// Parses the benchmark statistics from the plain text line. | |
/// | |
/// E.g. given the input <paramref name="line"/>: | |
/// | |
/// WorkloadTarget 1: 10 op, 1005842518 ns | |
/// | |
/// Will extract the number of <see cref="Operations"/> performed and the | |
/// total number of <see cref="Nanoseconds"/> it took to perform them. | |
/// </summary> | |
/// <param name="line">The line to parse.</param> | |
/// <param name="processIndex">Process launch index, indexed from one.</param> | |
/// <returns>An instance of <see cref="Measurement"/> if parsed successfully. <c>Null</c> in case of any trouble.</returns> | |
// ReSharper disable once UnusedParameter.Global | |
public static Measurement Parse(string line, int processIndex) | |
{ | |
if (string.IsNullOrWhiteSpace(line) || line.StartsWith(GcStats.ResultsLinePrefix)) | |
return Error(); | |
try |
Before #2148, like v0.13.2:
Master:
PR:
no validation errors:
Master:
PR: