Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Nitpicks
  • Loading branch information
am11 committed Nov 9, 2022
commit 2b316e9af0bfd515ca562b94d0592474d0dedce0
14 changes: 8 additions & 6 deletions src/jit-analyze/JitAnalyzeRootCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,21 @@ internal sealed class JitAnalyzeRootCommand : RootCommand
public Option<double> OverrideTotalBaseMetric { get; } =
new("--override-total-base-metric", result =>
{
if (double.TryParse(result.Tokens[0].Value, NumberStyles.Any, CultureInfo.InvariantCulture, out var val))
return val;
string optionValue = result.Tokens[0].Value;
if (double.TryParse(optionValue, NumberStyles.Any, CultureInfo.InvariantCulture, out var parsedValue))
return parsedValue;

result.ErrorMessage = $"Cannot parse argument '{result.Tokens[0].Value}' for option '--override-total-base-metric' as expected type 'System.Double'.";
result.ErrorMessage = $"Cannot parse argument '{optionValue}' for option '--override-total-base-metric' as expected type '{typeof(double).FullName}'.";
return 0;
}, false, "Override the total base metric shown in the output with this value. Useful when only changed .dasm files are present and these values are known");
public Option<double> OverrideTotalDiffMetric { get; } =
new("--override-total-diff-metric", result =>
{
if (double.TryParse(result.Tokens[0].Value, NumberStyles.Any, CultureInfo.InvariantCulture, out var val))
return val;
string optionValue = result.Tokens[0].Value;
if (double.TryParse(optionValue, NumberStyles.Any, CultureInfo.InvariantCulture, out var parsedValue))
return parsedValue;

result.ErrorMessage = $"Cannot parse argument '{result.Tokens[0].Value}' for option '--override-total-diff-metric' as expected type 'System.Double'.";
result.ErrorMessage = $"Cannot parse argument '{optionValue}' for option '--override-total-diff-metric' as expected type '{typeof(double).FullName}'.";
return 0;
}, false, "Override the total diff metric shown in the output with this value. Useful when only changed .dasm files are present and these values are known");
public Option<bool> IsDiffsOnly { get; } =
Expand Down