@@ -19,6 +19,9 @@ namespace BenchmarkDotNet.ConsoleArguments
1919 [ SuppressMessage ( "ReSharper" , "UnusedAutoPropertyAccessor.Global" ) ]
2020 public class CommandLineOptions
2121 {
22+ private const int DefaultDisassemblerRecursiveDepth = 1 ;
23+ private bool useDisassemblyDiagnoser ;
24+
2225 [ Option ( 'j' , "job" , Required = false , Default = "Default" , HelpText = "Dry/Short/Medium/Long or Default" ) ]
2326 public string BaseJob { get ; set ; }
2427
@@ -35,7 +38,11 @@ public class CommandLineOptions
3538 public bool UseThreadingDiagnoser { get ; set ; }
3639
3740 [ 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+ }
3946
4047 [ Option ( 'p' , "profiler" , Required = false , HelpText = "Profiles benchmarked code using selected profiler. Available options: EP/ETW/CV/NativeMemory" ) ]
4148 public string Profiler { get ; set ; }
@@ -145,7 +152,7 @@ public class CommandLineOptions
145152 [ Option ( "list" , Required = false , Default = ListBenchmarkCaseMode . Disabled , HelpText = "Prints all of the available benchmark names. Flat/Tree" ) ]
146153 public ListBenchmarkCaseMode ListBenchmarkCaseMode { get ; set ; }
147154
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." ) ]
149156 public int DisassemblerRecursiveDepth { get ; set ; }
150157
151158 [ Option ( "disasmFilter" , Required = false , HelpText = "Glob patterns applied to full method signatures by the the disassembler." ) ]
0 commit comments