File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ private ZeroMeasurementAnalyser() { }
1919
2020 protected override IEnumerable < Conclusion > AnalyseReport ( BenchmarkReport report , Summary summary )
2121 {
22- var currentFrequency = summary . HostEnvironmentInfo . Cpu . Value . MaxFrequency ( ) ;
22+ var currentFrequency = summary . HostEnvironmentInfo . Cpu . Value ? . MaxFrequency ( ) ;
2323 if ( ! currentFrequency . HasValue || currentFrequency <= 0 )
2424 currentFrequency = FallbackCpuResolutionValue . ToFrequency ( ) ;
2525
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ public class HostEnvironmentInfo : BenchmarkEnvironmentInfo
3838 /// <summary>
3939 /// is expensive to call (1s)
4040 /// </summary>
41- public Lazy < CpuInfo > Cpu { get ; protected set ; }
41+ public Lazy < CpuInfo ? > Cpu { get ; protected set ; }
4242
4343 public Lazy < OsInfo > Os { get ; protected set ; }
4444
@@ -78,7 +78,7 @@ protected HostEnvironmentInfo()
7878 AntivirusProducts = new Lazy < ICollection < Antivirus > > ( RuntimeInformation . GetAntivirusProducts ) ;
7979 VirtualMachineHypervisor = new Lazy < VirtualMachineHypervisor > ( RuntimeInformation . GetVirtualMachineHypervisor ) ;
8080 Os = new Lazy < OsInfo > ( OsDetector . GetOs ) ;
81- Cpu = new Lazy < CpuInfo > ( CpuDetector . CrossPlatform . Detect ) ;
81+ Cpu = new Lazy < CpuInfo ? > ( CpuDetector . CrossPlatform . Detect ) ;
8282 }
8383
8484 public new static HostEnvironmentInfo GetCurrent ( ) => current ??= new HostEnvironmentInfo ( ) ;
You can’t perform that action at this time.
0 commit comments