ntminer 5 rokov pred
rodič
commit
74a29769eb
38 zmenil súbory, kde vykonal 1 pridanie a 343 odobranie
  1. 0 9
      src/AppModels/AppRoot.partials.CoinGroupViewModels.cs
  2. 0 9
      src/AppModels/AppRoot.partials.CoinKernelViewModels.cs
  3. 0 9
      src/AppModels/AppRoot.partials.CoinProfileViewModels.cs
  4. 0 9
      src/AppModels/AppRoot.partials.CoinViewModels.cs
  5. 0 9
      src/AppModels/AppRoot.partials.DriveSetViewModel.cs
  6. 0 9
      src/AppModels/AppRoot.partials.FileWriterViewModels.cs
  7. 0 9
      src/AppModels/AppRoot.partials.FragmentWriterViewModels.cs
  8. 0 9
      src/AppModels/AppRoot.partials.GpuProfileViewModels.cs
  9. 0 9
      src/AppModels/AppRoot.partials.GpuSpeedViewModels.cs
  10. 0 9
      src/AppModels/AppRoot.partials.GpuViewModels.cs
  11. 0 9
      src/AppModels/AppRoot.partials.GroupViewModels.cs
  12. 0 9
      src/AppModels/AppRoot.partials.KernelInputViewModels.cs
  13. 0 9
      src/AppModels/AppRoot.partials.KernelOutputKeywordViewModels.cs
  14. 0 9
      src/AppModels/AppRoot.partials.KernelOutputTranslaterViewModels.cs
  15. 0 9
      src/AppModels/AppRoot.partials.KernelOutputViewModels.cs
  16. 0 9
      src/AppModels/AppRoot.partials.KernelViewModels.cs
  17. 0 9
      src/AppModels/AppRoot.partials.PackageViewModels.cs
  18. 0 9
      src/AppModels/AppRoot.partials.PoolKernelViewModels.cs
  19. 0 9
      src/AppModels/AppRoot.partials.PoolProfileViewModels.cs
  20. 0 9
      src/AppModels/AppRoot.partials.PoolViewModels.cs
  21. 0 9
      src/AppModels/AppRoot.partials.ShareViewModels.cs
  22. 0 9
      src/AppModels/AppRoot.partials.SysDicItemViewModels.cs
  23. 0 9
      src/AppModels/AppRoot.partials.SysDicViewModels.cs
  24. 0 9
      src/AppModels/AppRoot.partials.WalletViewModels.cs
  25. 0 9
      src/AppModels/MinerStudio/MinerStudioRoot.partials.CoinSnapshotDataViewModels.cs
  26. 0 9
      src/AppModels/MinerStudio/MinerStudioRoot.partials.ColumnsShowViewModels.cs
  27. 0 9
      src/AppModels/MinerStudio/MinerStudioRoot.partials.MineWorkViewModels.cs
  28. 0 9
      src/AppModels/MinerStudio/MinerStudioRoot.partials.MinerGroupViewModels.cs
  29. 0 9
      src/AppModels/MinerStudio/MinerStudioRoot.partials.NTMinerWalletViewModels.cs
  30. 0 9
      src/AppModels/MinerStudio/MinerStudioRoot.partials.OverClockDataViewModels.cs
  31. 0 9
      src/AppModels/Vms/GpuStatusBarViewModel.cs
  32. 0 18
      src/AppModels/Vms/MinerProfileViewModel.cs
  33. 0 9
      src/AppModels/Vms/StartStopMineButtonViewModel.cs
  34. 0 9
      src/AppViews0/Views/Ucs/StateBar.xaml.cs
  35. 0 9
      src/NTMinerClient/Core/Impl/CalcConfigSet.cs
  36. 0 9
      src/NTMinerClient/Core/Kernels/KernelSetExtension.cs
  37. 0 9
      src/NTMinerClient/Mine/MineContext.cs
  38. 1 1
      src/NTMinerLogging/NTStopwatch.cs

+ 0 - 9
src/AppModels/AppRoot.partials.CoinGroupViewModels.cs

@@ -13,9 +13,6 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
                     action: message => {
                         _dicById.Clear();
@@ -46,12 +43,6 @@ namespace NTMiner {
                         }
                     }, location: this.GetType());
                 Init();
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             private void Init() {

+ 0 - 9
src/AppModels/AppRoot.partials.CoinKernelViewModels.cs

@@ -13,9 +13,6 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
                     action: message => {
                         _dicById.Clear();
@@ -72,12 +69,6 @@ namespace NTMiner {
                         }
                     }, location: this.GetType());
                 Init();
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             private void Init() {

+ 0 - 9
src/AppModels/AppRoot.partials.CoinProfileViewModels.cs

@@ -15,9 +15,6 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 AddEventPath<CoinKernelProfilePropertyChangedEvent>("币种内核设置变更后刷新VM内存", LogEnum.DevConsole,
                     action: message => {
                         if (_coinKernelProfileDicById.ContainsKey(message.CoinKernelId)) {
@@ -35,12 +32,6 @@ namespace NTMiner {
                         _coinKernelProfileDicById.Clear();
                         _coinProfileDicById.Clear();
                     }, location: this.GetType());
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             public CoinProfileViewModel GetOrCreateCoinProfile(Guid coinId) {

+ 0 - 9
src/AppModels/AppRoot.partials.CoinViewModels.cs

@@ -13,9 +13,6 @@ namespace NTMiner {
             private readonly Dictionary<Guid, CoinViewModel> _dicById = new Dictionary<Guid, CoinViewModel>();
 
             private CoinViewModels() {
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
@@ -101,12 +98,6 @@ namespace NTMiner {
                         }
                     }, location: this.GetType());
                 Init();
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             private void Init() {

+ 0 - 9
src/AppModels/AppRoot.partials.DriveSetViewModel.cs

@@ -16,9 +16,6 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 foreach (var drive in VirtualRoot.DriveSet.AsEnumerable()) {
                     _drives.Add(new DriveViewModel(drive));
                 }
@@ -27,12 +24,6 @@ namespace NTMiner {
                     OnPropertyChanged(nameof(TotalVirtualMemoryMb));
                     OnPropertyChanged(nameof(IsStateChanged));
                 });
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             public List<DriveViewModel> Drives {

+ 0 - 9
src/AppModels/AppRoot.partials.FileWriterViewModels.cs

@@ -14,9 +14,6 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 this.Add = new DelegateCommand(() => {
                     new FileWriterViewModel(Guid.NewGuid()).Edit.Execute(FormType.Add);
                 });
@@ -49,12 +46,6 @@ namespace NTMiner {
                         OnPropertyChangeds();
                     }, location: this.GetType());
                 Init();
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             private void Init() {

+ 0 - 9
src/AppModels/AppRoot.partials.FragmentWriterViewModels.cs

@@ -14,9 +14,6 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 this.Add = new DelegateCommand(() => {
                     new FragmentWriterViewModel(Guid.NewGuid()).Edit.Execute(FormType.Add);
                 });
@@ -49,12 +46,6 @@ namespace NTMiner {
                         OnPropertyChangeds();
                     }, location: this.GetType());
                 Init();
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             private void Init() {

+ 0 - 9
src/AppModels/AppRoot.partials.GpuProfileViewModels.cs

@@ -16,9 +16,6 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 VirtualRoot.AddEventPath<GpuProfileSetRefreshedEvent>("Gpu超频集合刷新后刷新附着在当前币种上的超频数据", LogEnum.DevConsole,
                     action: message => {
                         lock (_locker) {
@@ -64,12 +61,6 @@ namespace NTMiner {
                             }
                         }
                     }, location: this.GetType());
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             private readonly object _locker = new object();

+ 0 - 9
src/AppModels/AppRoot.partials.GpuSpeedViewModels.cs

@@ -40,9 +40,6 @@ namespace NTMiner {
             }
 
             private GpuSpeedViewModels() {
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
@@ -147,12 +144,6 @@ namespace NTMiner {
                         TotalSpeedVm.MainCoinSpeed.OnPropertyChanged(nameof(SpeedViewModel.LastSpeedOnText));
                         TotalSpeedVm.DualCoinSpeed.OnPropertyChanged(nameof(SpeedViewModel.LastSpeedOnText));
                     }, location: this.GetType());
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             public void Refresh() {

+ 0 - 9
src/AppModels/AppRoot.partials.GpuViewModels.cs

@@ -15,9 +15,6 @@ namespace NTMiner {
             private string _temperatureMaxText = "0 ℃";
             private readonly GpuViewModel _gpuAllVm;
             private GpuViewModels() {
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
@@ -95,12 +92,6 @@ namespace NTMiner {
                             UpdateMinMax();
                         }
                     }, location: this.GetType());
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             private void UpdateMinMax() {

+ 0 - 9
src/AppModels/AppRoot.partials.GroupViewModels.cs

@@ -14,9 +14,6 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 this.Add = new DelegateCommand(() => {
                     new GroupViewModel(Guid.NewGuid()) {
                         SortNumber = Count + 1
@@ -56,12 +53,6 @@ namespace NTMiner {
                         OnPropertyChangeds();
                     }, location: this.GetType());
                 Init();
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             private void Init() {

+ 0 - 9
src/AppModels/AppRoot.partials.KernelInputViewModels.cs

@@ -13,9 +13,6 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
                     action: message => {
                         _dicById.Clear();
@@ -60,12 +57,6 @@ namespace NTMiner {
                         }
                     }, location: this.GetType());
                 Init();
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             private void Init() {

+ 0 - 9
src/AppModels/AppRoot.partials.KernelOutputKeywordViewModels.cs

@@ -14,9 +14,6 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 AddEventPath<KernelOutputKeywordLoadedEvent>("从服务器加载了内核输入关键字后刷新Vm集", LogEnum.DevConsole,
                     action: message => {
                         KernelOutputKeywordViewModel[] toRemoves = _dicById.Where(a => a.Value.GetDataLevel() == DataLevel.Global).Select(a => a.Value).ToArray();
@@ -77,12 +74,6 @@ namespace NTMiner {
                         }
                     }, location: this.GetType());
                 Init();
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             private void Init() {

+ 0 - 9
src/AppModels/AppRoot.partials.KernelOutputTranslaterViewModels.cs

@@ -14,9 +14,6 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
                     action: message => {
                         _dicById.Clear();
@@ -64,12 +61,6 @@ namespace NTMiner {
                         }
                     }, location: this.GetType());
                 Init();
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             private void Init() {

+ 0 - 9
src/AppModels/AppRoot.partials.KernelOutputViewModels.cs

@@ -13,9 +13,6 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
                     action: message => {
                         _dicById.Clear();
@@ -49,12 +46,6 @@ namespace NTMiner {
                         }
                     }, location: this.GetType());
                 Init();
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             private void Init() {

+ 0 - 9
src/AppModels/AppRoot.partials.KernelViewModels.cs

@@ -19,9 +19,6 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
                     action: message => {
                         _dicById.Clear();
@@ -69,12 +66,6 @@ namespace NTMiner {
                         }
                     }, location: this.GetType());
                 Init();
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             private void Init() {

+ 0 - 9
src/AppModels/AppRoot.partials.PackageViewModels.cs

@@ -13,9 +13,6 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
                     action: message => {
                         _dicById.Clear();
@@ -51,12 +48,6 @@ namespace NTMiner {
                         }
                     }, location: this.GetType());
                 Init();
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             private void Init() {

+ 0 - 9
src/AppModels/AppRoot.partials.PoolKernelViewModels.cs

@@ -14,9 +14,6 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 AddEventPath<PoolKernelAddedEvent>("新添了矿池内核后刷新矿池内核VM内存", LogEnum.DevConsole,
                     action: (message) => {
                         if (!_dicById.ContainsKey(message.Source.GetId())) {
@@ -43,12 +40,6 @@ namespace NTMiner {
                         }
                     }, location: this.GetType());
                 Init();
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             private void Init() {

+ 0 - 9
src/AppModels/AppRoot.partials.PoolProfileViewModels.cs

@@ -12,9 +12,6 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 AddEventPath<PoolProfilePropertyChangedEvent>("矿池设置变更后刷新VM内存", LogEnum.DevConsole,
                     action: message => {
                         if (_dicById.TryGetValue(message.PoolId, out PoolProfileViewModel vm)) {
@@ -25,12 +22,6 @@ namespace NTMiner {
                     action: message => {
                         _dicById.Clear();
                     }, location: this.GetType());
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             private readonly object _locker = new object();

+ 0 - 9
src/AppModels/AppRoot.partials.PoolViewModels.cs

@@ -12,9 +12,6 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
                     action: message => {
                         _dicById.Clear();
@@ -53,12 +50,6 @@ namespace NTMiner {
                         }
                     }, location: this.GetType());
                 Init();
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             private void Init() {

+ 0 - 9
src/AppModels/AppRoot.partials.ShareViewModels.cs

@@ -12,21 +12,12 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 AddEventPath<ShareChangedEvent>("收益变更后调整VM内存", LogEnum.DevConsole,
                     action: message => {
                         if (_dicByCoinId.TryGetValue(message.Source.CoinId, out ShareViewModel shareVm)) {
                             shareVm.Update(message.Source);
                         }
                     }, location: this.GetType());
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             private readonly object _locker = new object();

+ 0 - 9
src/AppModels/AppRoot.partials.SysDicItemViewModels.cs

@@ -13,9 +13,6 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
                     action: message => {
                         _dicById.Clear();
@@ -59,12 +56,6 @@ namespace NTMiner {
                         }
                     }, location: this.GetType());
                 Init();
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             private void Init() {

+ 0 - 9
src/AppModels/AppRoot.partials.SysDicViewModels.cs

@@ -16,9 +16,6 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 VirtualRoot.AddEventPath<ServerContextReInitedEvent>("ServerContext刷新后刷新VM内存", LogEnum.DevConsole,
                     action: message => {
                         _dicByCode.Clear();
@@ -60,12 +57,6 @@ namespace NTMiner {
                         OnPropertyChangeds();
                     }, location: this.GetType());
                 Init();
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             private void Init() {

+ 0 - 9
src/AppModels/AppRoot.partials.WalletViewModels.cs

@@ -12,9 +12,6 @@ namespace NTMiner {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 VirtualRoot.AddEventPath<LocalContextReInitedEvent>("LocalContext刷新后刷新钱包Vm内存", LogEnum.None,
                     action: message=> {
                         _dicById.Clear();
@@ -50,12 +47,6 @@ namespace NTMiner {
                         }
                     }, location: this.GetType());
                 Init();
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             private void Init() {

+ 0 - 9
src/AppModels/MinerStudio/MinerStudioRoot.partials.CoinSnapshotDataViewModels.cs

@@ -16,18 +16,9 @@ namespace NTMiner.MinerStudio {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 foreach (var coinVm in AppRoot.CoinVms.AllCoins) {
                     _dicByCoinCode.Add(coinVm.Code, new CoinSnapshotDataViewModel(CoinSnapshotData.CreateEmpty(coinVm.Code)));
                 }
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             public bool TryGetSnapshotDataVm(string coinCode, out CoinSnapshotDataViewModel vm) {

+ 0 - 9
src/AppModels/MinerStudio/MinerStudioRoot.partials.ColumnsShowViewModels.cs

@@ -19,9 +19,6 @@ namespace NTMiner.MinerStudio {
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 this.Add = new DelegateCommand(() => {
                     WpfUtil.ShowInputDialog("列分组名称", string.Empty, string.Empty, columnsShowName => {
                         if (string.IsNullOrEmpty(columnsShowName)) {
@@ -73,12 +70,6 @@ namespace NTMiner.MinerStudio {
                 foreach (var item in NTMinerContext.Instance.MinerStudioContext.ColumnsShowSet.GetAll()) {
                     _dicById.Add(item.Id, new ColumnsShowViewModel(item));
                 }
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             public List<ColumnsShowViewModel> List {

+ 0 - 9
src/AppModels/MinerStudio/MinerStudioRoot.partials.MineWorkViewModels.cs

@@ -14,9 +14,6 @@ namespace NTMiner.MinerStudio {
             public ICommand Add { get; private set; }
 
             private MineWorkViewModels() {
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
@@ -65,12 +62,6 @@ namespace NTMiner.MinerStudio {
                         }
                     }
                 }, this.GetType());
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             private void OnPropertyChangeds() {

+ 0 - 9
src/AppModels/MinerStudio/MinerStudioRoot.partials.MinerGroupViewModels.cs

@@ -14,9 +14,6 @@ namespace NTMiner.MinerStudio {
             public ICommand Add { get; private set; }
 
             private MinerGroupViewModels() {
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
@@ -59,12 +56,6 @@ namespace NTMiner.MinerStudio {
                         MinerClientsWindowVm.OnPropertyChanged(nameof(MinerClientsWindowViewModel.SelectedMinerGroup));
                     }
                 }, this.GetType());
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             private void OnPropertyChangeds() {

+ 0 - 9
src/AppModels/MinerStudio/MinerStudioRoot.partials.NTMinerWalletViewModels.cs

@@ -13,9 +13,6 @@ namespace NTMiner.MinerStudio {
             public ICommand Add { get; private set; }
 
             private NTMinerWalletViewModels() {
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
@@ -49,12 +46,6 @@ namespace NTMiner.MinerStudio {
                             coinVm.OnPropertyChanged(nameof(coinVm.NTMinerWallets));
                         }
                     }, location: this.GetType());
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             private void Init(bool refresh) {

+ 0 - 9
src/AppModels/MinerStudio/MinerStudioRoot.partials.OverClockDataViewModels.cs

@@ -10,9 +10,6 @@ namespace NTMiner.MinerStudio {
             private readonly Dictionary<Guid, OverClockDataViewModel> _dicById = new Dictionary<Guid, OverClockDataViewModel>();
 
             private OverClockDataViewModels() {
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 if (WpfUtil.IsInDesignMode) {
                     return;
                 }
@@ -43,12 +40,6 @@ namespace NTMiner.MinerStudio {
                             coinVm.OnPropertyChanged(nameof(coinVm.OverClockDatas));
                         }
                     }, location: this.GetType());
-#if DEBUG
-                var elapsedMilliseconds = NTStopwatch.Stop();
-                if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-                }
-#endif
             }
 
             private void Init(bool refresh) {

+ 0 - 9
src/AppModels/Vms/GpuStatusBarViewModel.cs

@@ -7,19 +7,10 @@ namespace NTMiner.Vms {
         public static readonly GpuStatusBarViewModel Instance = new GpuStatusBarViewModel();
 
         private GpuStatusBarViewModel() {
-#if DEBUG
-                NTStopwatch.Start();
-#endif
             if (WpfUtil.IsInDesignMode) {
                 return;
             }
             this.GpuAllVm = AppRoot.GpuVms.Items.FirstOrDefault(a => a.Index == NTMinerContext.GpuAllId);
-#if DEBUG
-            var elapsedMilliseconds = NTStopwatch.Stop();
-            if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-            }
-#endif
         }
 
         public GpuViewModel GpuAllVm {

+ 0 - 18
src/AppModels/Vms/MinerProfileViewModel.cs

@@ -31,9 +31,6 @@ namespace NTMiner.Vms {
 
         private readonly Dictionary<string, PropertyInfo> _propertyInfos = new Dictionary<string, PropertyInfo>();
         public MinerProfileViewModel() {
-#if DEBUG
-            NTStopwatch.Start();
-#endif
             if (WpfUtil.IsInDesignMode) {
                 return;
             }
@@ -147,9 +144,6 @@ namespace NTMiner.Vms {
             }
             NTMinerContext.SetRefreshArgsAssembly((reason) => {
                 Write.DevDebug(() => $"RefreshArgsAssembly" + reason, ConsoleColor.Cyan);
-#if DEBUG
-                NTStopwatch.Start();
-#endif
                 #region 确保双挖权重在合法的范围内
                 if (CoinVm != null && CoinVm.CoinKernel != null && CoinVm.CoinKernel.Kernel != null) {
                     var coinKernelProfile = CoinVm.CoinKernel.CoinKernelProfile;
@@ -174,12 +168,6 @@ namespace NTMiner.Vms {
                 else {
                     this.ArgsAssembly = string.Empty;
                 }
-#if DEBUG
-                var milliseconds = NTStopwatch.Stop();
-                if (milliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                    Write.DevTimeSpan($"耗时{milliseconds} {this.GetType().Name}.SetRefreshArgsAssembly");
-                }
-#endif
             });
             VirtualRoot.AddEventPath<ServerContextVmsReInitedEvent>("ServerContext的VM集刷新后刷新视图界面", LogEnum.DevConsole,
                 action: message => {
@@ -214,12 +202,6 @@ namespace NTMiner.Vms {
             VirtualRoot.AddEventPath<CoinVmRemovedEvent>("Vm集删除了新币种后刷新MinerProfileVm内存", LogEnum.DevConsole, action: message => {
                 OnPropertyChanged(nameof(CoinVm));
             }, this.GetType());
-#if DEBUG
-            var elapsedMilliseconds = NTStopwatch.Stop();
-            if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-            }
-#endif
         }
 
         #region IWsStateViewModel的成员

+ 0 - 9
src/AppModels/Vms/StartStopMineButtonViewModel.cs

@@ -12,9 +12,6 @@ namespace NTMiner.Vms {
             if (WpfUtil.IsInDesignMode) {
                 return;
             }
-#if DEBUG
-            NTStopwatch.Start();
-#endif
             VirtualRoot.AddCmdPath<StopMineCommand>(action: message => {
                 if (!NTMinerContext.Instance.IsMining) {
                     this.MinerProfile.IsMining = false;
@@ -34,12 +31,6 @@ namespace NTMiner.Vms {
                 VirtualRoot.ThisLocalInfo(nameof(StartStopMineButtonViewModel), $"手动停止挖矿", toConsole: true);
                 VirtualRoot.Execute(new StopMineCommand());
             });
-#if DEBUG
-            var elapsedMilliseconds = NTStopwatch.Stop();
-            if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-            }
-#endif
         }
 
         public void AutoStart() {

+ 0 - 9
src/AppViews0/Views/Ucs/StateBar.xaml.cs

@@ -15,9 +15,6 @@ namespace NTMiner.Views.Ucs {
         }
 
         public StateBar() {
-#if DEBUG
-            NTStopwatch.Start();
-#endif
             InitializeComponent();
             if (WpfUtil.IsInDesignMode) {
                 return;
@@ -75,12 +72,6 @@ namespace NTMiner.Views.Ucs {
             if (VirtualRoot.DriveSet.OSVirtualMemoryMb < gpuSet.Count * 4) {
                 BtnShowVirtualMemory.Foreground = WpfUtil.RedBrush;
             }
-#if DEBUG
-            var elapsedMilliseconds = NTStopwatch.Stop();
-            if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.ctor");
-            }
-#endif
         }
 
         private void BtnCheckUpdate_Click(object sender, RoutedEventArgs e) {

+ 0 - 9
src/NTMinerClient/Core/Impl/CalcConfigSet.cs

@@ -33,9 +33,6 @@ namespace NTMiner.Core.Impl {
         }
 
         private void Init(List<CalcConfigData> data) {
-#if DEBUG
-            NTStopwatch.Start();
-#endif
             var list = _root.ServerContext.CoinSet.AsEnumerable().OrderBy(a => a.Code).Select(a => new CalcConfigData {
                 CoinCode = a.Code,
                 CreatedOn = DateTime.Now,
@@ -54,12 +51,6 @@ namespace NTMiner.Core.Impl {
                 }
             }
             _dicByCoinCode = list.ToDictionary(a => a.CoinCode, a => a, StringComparer.OrdinalIgnoreCase);
-#if DEBUG
-            var elapsedMilliseconds = NTStopwatch.Stop();
-            if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.Init");
-            }
-#endif
         }
 
         public bool TryGetCalcConfig(ICoin coin, out ICalcConfig calcConfig) {

+ 0 - 9
src/NTMinerClient/Core/Kernels/KernelSetExtension.cs

@@ -9,19 +9,10 @@ namespace NTMiner.Core.Kernels {
         /// <param name="kernelSet"></param>
         /// <returns></returns>
         public static HashSet<string> GetAllKernelProcessNames(this IKernelSet kernelSet) {
-#if DEBUG
-            NTStopwatch.Start();
-#endif
             HashSet<string> hashSet = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
             foreach (var kernel in kernelSet.AsEnumerable()) {
                 hashSet.Add(kernel.GetProcessName());
             }
-#if DEBUG
-            var elapsedMilliseconds = NTStopwatch.Stop();
-            if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                Write.DevTimeSpan($"耗时{elapsedMilliseconds} {nameof(KernelSetExtension)}.{nameof(GetAllKernelProcessNames)}()");
-            }
-#endif
             return hashSet;
         }
     }

+ 0 - 9
src/NTMinerClient/Mine/MineContext.cs

@@ -176,17 +176,8 @@ namespace NTMiner.Mine {
             Task.Factory.StartNew(() => {
                 lock (_locker) {
                     try {
-#if DEBUG
-                            NTStopwatch.Start();
-#endif
                         // 清理除当前外的Temp/Kernel
                         Cleaner.Instance.Clear();
-#if DEBUG
-                            var elapsedMilliseconds = NTStopwatch.Stop();
-                            if (elapsedMilliseconds.ElapsedMilliseconds > NTStopwatch.ElapsedMilliseconds) {
-                                Write.DevTimeSpan($"耗时{elapsedMilliseconds} {this.GetType().Name}.{nameof(CreateProcessAsync)}[{nameof(Cleaner)}.{nameof(Cleaner.Clear)}]");
-                            }
-#endif
                         Write.UserOk("场地打扫完毕");
                         // 应用超频
                         if (NTMinerContext.Instance.GpuProfileSet.IsOverClockEnabled(MainCoin.GetId())) {

+ 1 - 1
src/NTMinerLogging/NTStopwatch.cs

@@ -29,6 +29,7 @@ namespace NTMiner {
             return new NTStopwatch();
         });
 
+        // 注意比对Start和Stop的引用计数是否相等,由于用using裹住太难看这里就不借助using保持Start和Stop的相等了
         public static void Start() {
             _stopwatchLocal.Value.DoStart();
         }
@@ -50,7 +51,6 @@ namespace NTMiner {
             }
         }
 
-        // 注意比对Start和Stop的引用计数是否相等,由于用using裹住太难看这里就不借助using保持Start和Stop的相等了
         private void DoStart() {
             if (!_isEnabled) {
                 return;