@@ -19,6 +19,9 @@ namespace BenchmarkDotNet.ConsoleArguments
19
19
[ SuppressMessage ( "ReSharper" , "UnusedAutoPropertyAccessor.Global" ) ]
20
20
public class CommandLineOptions
21
21
{
22
+ private const int DefaultDisassemblerRecursiveDepth = 1 ;
23
+ private bool useDisassemblyDiagnoser ;
24
+
22
25
[ Option ( 'j' , "job" , Required = false , Default = "Default" , HelpText = "Dry/Short/Medium/Long or Default" ) ]
23
26
public string BaseJob { get ; set ; }
24
27
@@ -35,7 +38,11 @@ public class CommandLineOptions
35
38
public bool UseThreadingDiagnoser { get ; set ; }
36
39
37
40
[ Option ( 'd' , "disasm" , Required = false , Default = false , HelpText = "Gets disassembly of benchmarked code" ) ]
38
- public bool UseDisassemblyDiagnoser { get ; set ; }
41
+ public bool UseDisassemblyDiagnoser
42
+ {
43
+ get => useDisassemblyDiagnoser || DisassemblerRecursiveDepth != DefaultDisassemblerRecursiveDepth || DisassemblerFilters . Any ( ) ;
44
+ set => useDisassemblyDiagnoser = value ;
45
+ }
39
46
40
47
[ Option ( 'p' , "profiler" , Required = false , HelpText = "Profiles benchmarked code using selected profiler. Available options: EP/ETW/CV/NativeMemory" ) ]
41
48
public string Profiler { get ; set ; }
@@ -145,7 +152,7 @@ public class CommandLineOptions
145
152
[ Option ( "list" , Required = false , Default = ListBenchmarkCaseMode . Disabled , HelpText = "Prints all of the available benchmark names. Flat/Tree" ) ]
146
153
public ListBenchmarkCaseMode ListBenchmarkCaseMode { get ; set ; }
147
154
148
- [ Option ( "disasmDepth" , Required = false , Default = 1 , HelpText = "Sets the recursive depth for the disassembler." ) ]
155
+ [ Option ( "disasmDepth" , Required = false , Default = DefaultDisassemblerRecursiveDepth , HelpText = "Sets the recursive depth for the disassembler." ) ]
149
156
public int DisassemblerRecursiveDepth { get ; set ; }
150
157
151
158
[ Option ( "disasmFilter" , Required = false , HelpText = "Glob patterns applied to full method signatures by the the disassembler." ) ]
0 commit comments