Skip to content

Commit c4c62d4

Browse files
author
ntminer
committed
test
1 parent 9dc196d commit c4c62d4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1069
-1182
lines changed

NTMiner.sln

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WsServer", "src\WsServer\Ws
110110
EndProject
111111
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tools", "Tools", "{E0B0D173-418C-49D0-9018-99BC6C526CF5}"
112112
EndProject
113-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinerGpu", "src\MinerGpu\MinerGpu.csproj", "{AB085388-E970-491F-ABFC-27D556C27332}"
114-
EndProject
115113
Global
116114
GlobalSection(SolutionConfigurationPlatforms) = preSolution
117115
Debug|Any CPU = Debug|Any CPU
@@ -434,18 +432,6 @@ Global
434432
{637E9AD8-6410-419B-8FEE-2528130F871A}.Release|x64.Build.0 = Release|Any CPU
435433
{637E9AD8-6410-419B-8FEE-2528130F871A}.Release|x86.ActiveCfg = Release|Any CPU
436434
{637E9AD8-6410-419B-8FEE-2528130F871A}.Release|x86.Build.0 = Release|Any CPU
437-
{AB085388-E970-491F-ABFC-27D556C27332}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
438-
{AB085388-E970-491F-ABFC-27D556C27332}.Debug|Any CPU.Build.0 = Debug|Any CPU
439-
{AB085388-E970-491F-ABFC-27D556C27332}.Debug|x64.ActiveCfg = Debug|Any CPU
440-
{AB085388-E970-491F-ABFC-27D556C27332}.Debug|x64.Build.0 = Debug|Any CPU
441-
{AB085388-E970-491F-ABFC-27D556C27332}.Debug|x86.ActiveCfg = Debug|Any CPU
442-
{AB085388-E970-491F-ABFC-27D556C27332}.Debug|x86.Build.0 = Debug|Any CPU
443-
{AB085388-E970-491F-ABFC-27D556C27332}.Release|Any CPU.ActiveCfg = Release|Any CPU
444-
{AB085388-E970-491F-ABFC-27D556C27332}.Release|Any CPU.Build.0 = Release|Any CPU
445-
{AB085388-E970-491F-ABFC-27D556C27332}.Release|x64.ActiveCfg = Release|Any CPU
446-
{AB085388-E970-491F-ABFC-27D556C27332}.Release|x64.Build.0 = Release|Any CPU
447-
{AB085388-E970-491F-ABFC-27D556C27332}.Release|x86.ActiveCfg = Release|Any CPU
448-
{AB085388-E970-491F-ABFC-27D556C27332}.Release|x86.Build.0 = Release|Any CPU
449435
EndGlobalSection
450436
GlobalSection(SolutionProperties) = preSolution
451437
HideSolutionNode = FALSE
@@ -479,7 +465,6 @@ Global
479465
{E7B88637-7704-4701-98E0-7875BB6E8C98} = {2C8C5FC2-8B81-4228-8EBD-6B491216FBC1}
480466
{637E9AD8-6410-419B-8FEE-2528130F871A} = {2C8C5FC2-8B81-4228-8EBD-6B491216FBC1}
481467
{E0B0D173-418C-49D0-9018-99BC6C526CF5} = {B8FD9576-411F-4634-89D9-806FFD21DBA3}
482-
{AB085388-E970-491F-ABFC-27D556C27332} = {B8FD9576-411F-4634-89D9-806FFD21DBA3}
483468
EndGlobalSection
484469
GlobalSection(ExtensibilityGlobals) = postSolution
485470
SolutionGuid = {A5D14B0A-73FF-46E8-87F3-7E83FFC1DBDD}

src/AppModels/AppStatic.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,12 +233,12 @@ public static Visibility IsAmdGpuVisible {
233233
}
234234
}
235235

236-
public static bool IsAmdGpu {
236+
public static bool IsHasATIGpu {
237237
get {
238238
if (WpfUtil.IsInDesignMode) {
239239
return true;
240240
}
241-
return NTMinerContext.Instance.GpuSet.GpuType == GpuType.AMD;
241+
return AdlHelper.IsHasATIGpu;
242242
}
243243
}
244244
#endregion

src/AppModels/MinerStudio/Vms/WebApiServerStateViewModel.cs

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@ public class WebApiServerStateViewModel : ViewModelBase, IWebApiServerState {
1111
private ulong _totalPhysicalMemory;
1212
private string _address;
1313
private double _cpuPerformance;
14-
private double _processPerformance;
1514
private ulong _availablePhysicalMemory;
16-
private ulong _workingSet;
15+
private double _processMemoryMb;
1716
private CpuData _cpu;
1817
private CpuDataViewModel _cpuVm;
1918
private List<WsServerNodeState> _wsServerNodes;
@@ -25,9 +24,8 @@ public WebApiServerStateViewModel(IWebApiServerState data) {
2524
_totalPhysicalMemory = data.TotalPhysicalMemory;
2625
_address = data.Address;
2726
_cpuPerformance = data.CpuPerformance;
28-
_processPerformance = data.ProcessPerformance;
2927
_availablePhysicalMemory = data.AvailablePhysicalMemory;
30-
_workingSet = data.WorkingSet;
28+
_processMemoryMb = data.ProcessMemoryMb;
3129
_cpu = data.Cpu;
3230
_cpuVm = new CpuDataViewModel(data.Cpu);
3331
_wsServerNodes = data.WsServerNodes;
@@ -40,9 +38,8 @@ public void Update(IWebApiServerState data) {
4038
this.TotalPhysicalMemory = data.TotalPhysicalMemory;
4139
this.Address = data.Address;
4240
this.CpuPerformance = data.CpuPerformance;
43-
this.ProcessPerformance = data.ProcessPerformance;
4441
this.AvailablePhysicalMemory = data.AvailablePhysicalMemory;
45-
this.WorkingSet = data.WorkingSet;
42+
this.ProcessMemoryMb = data.ProcessMemoryMb;
4643
this.Cpu = data.Cpu;
4744
this.WsServerNodes = data.WsServerNodes;
4845
}
@@ -162,23 +159,6 @@ public string CpuPerformanceText {
162159
}
163160
}
164161

165-
public double ProcessPerformance {
166-
get => _processPerformance;
167-
set {
168-
if (_processPerformance != value) {
169-
_processPerformance = value;
170-
OnPropertyChanged(nameof(ProcessPerformance));
171-
OnPropertyChanged(nameof(ProcessPerformanceText));
172-
}
173-
}
174-
}
175-
176-
public string ProcessPerformanceText {
177-
get {
178-
return this.ProcessPerformance.ToString("f1") + " %";
179-
}
180-
}
181-
182162
public ulong AvailablePhysicalMemory {
183163
get => _availablePhysicalMemory;
184164
set {
@@ -189,14 +169,21 @@ public ulong AvailablePhysicalMemory {
189169
}
190170
}
191171

192-
public ulong WorkingSet {
193-
get => _workingSet;
172+
public double ProcessMemoryMb {
173+
get => _processMemoryMb;
194174
set {
195-
if (_workingSet != value) {
196-
_workingSet = value;
197-
OnPropertyChanged(nameof(WorkingSet));
175+
if (_processMemoryMb != value) {
176+
_processMemoryMb = value;
177+
OnPropertyChanged(nameof(ProcessMemoryMb));
178+
OnPropertyChanged(nameof(ProcessMemoryMbText));
198179
}
199180
}
200181
}
182+
183+
public string ProcessMemoryMbText {
184+
get {
185+
return this.ProcessMemoryMb.ToString("f1") + " Mb";
186+
}
187+
}
201188
}
202189
}

src/AppModels/MinerStudio/Vms/WsServerNodeStateViewModel.cs

Lines changed: 15 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ public class WsServerNodeStateViewModel : ViewModelBase, IWsServerNode {
1313
private string _osInfo;
1414
private ulong _totalPhysicalMemory;
1515
private double _cpuPerformance;
16-
private double _processPerformance;
1716
private ulong _availablePhysicalMemory;
18-
private ulong _workingSet;
17+
private double _processMemoryMb;
1918
private CpuData _cpu;
2019
private CpuDataViewModel _cpuVm;
2120

@@ -37,8 +36,7 @@ public WsServerNodeStateViewModel(IWsServerNode data) {
3736
_totalPhysicalMemory = data.TotalPhysicalMemory;
3837
_availablePhysicalMemory = data.AvailablePhysicalMemory;
3938
_cpuPerformance = data.CpuPerformance;
40-
_processPerformance = data.ProcessPerformance;
41-
_workingSet = data.WorkingSet;
39+
_processMemoryMb = data.ProcessMemoryMb;
4240
_cpu = data.Cpu;
4341
_cpuVm = new CpuDataViewModel(data.Cpu);
4442
}
@@ -52,9 +50,8 @@ public void Update(IVarWsServerNode data) {
5250
this.MinerClientSessionCount = data.MinerClientSessionCount;
5351
this.MinerStudioSessionCount = data.MinerStudioSessionCount;
5452
this.CpuPerformance = data.CpuPerformance;
55-
this.ProcessPerformance = data.ProcessPerformance;
5653
this.AvailablePhysicalMemory = data.AvailablePhysicalMemory;
57-
this.WorkingSet = data.WorkingSet;
54+
this.ProcessMemoryMb = data.ProcessMemoryMb;
5855
}
5956

6057
public string Address {
@@ -176,23 +173,6 @@ public string CpuPerformanceText {
176173
}
177174
}
178175

179-
public double ProcessPerformance {
180-
get => _processPerformance;
181-
set {
182-
if (_processPerformance != value) {
183-
_processPerformance = value;
184-
OnPropertyChanged(nameof(ProcessPerformance));
185-
OnPropertyChanged(nameof(ProcessPerformanceText));
186-
}
187-
}
188-
}
189-
190-
public string ProcessPerformanceText {
191-
get {
192-
return this.ProcessPerformance.ToString("f1") + " %";
193-
}
194-
}
195-
196176
public ulong AvailablePhysicalMemory {
197177
get => _availablePhysicalMemory;
198178
set {
@@ -203,14 +183,21 @@ public ulong AvailablePhysicalMemory {
203183
}
204184
}
205185

206-
public ulong WorkingSet {
207-
get => _workingSet;
186+
public double ProcessMemoryMb {
187+
get => _processMemoryMb;
208188
set {
209-
if (_workingSet != value) {
210-
_workingSet = value;
211-
OnPropertyChanged(nameof(WorkingSet));
189+
if (_processMemoryMb != value) {
190+
_processMemoryMb = value;
191+
OnPropertyChanged(nameof(ProcessMemoryMb));
192+
OnPropertyChanged(nameof(ProcessMemoryMbText));
212193
}
213194
}
214195
}
196+
197+
public string ProcessMemoryMbText {
198+
get {
199+
return this.ProcessMemoryMb.ToString("f1") + " Mb";
200+
}
201+
}
215202
}
216203
}

src/AppModels/Vms/KernelOutputViewModel.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,7 @@ public string RejectOneShare {
297297

298298
public bool IsRejectOneGpuShare {
299299
get {
300-
if (string.IsNullOrEmpty(RejectOneShare)) {
301-
return false;
302-
}
303-
return RejectOneShare.Contains("?<gpu>");
300+
return !string.IsNullOrEmpty(RejectOneShare);
304301
}
305302
}
306303

src/AppViews0/MinerStudio/Views/Ucs/WsServerNodePage.xaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
<WrapPanel>
3333
<TextBlock Style="{StaticResource LblTb}">节点地址</TextBlock>
3434
<TextBlock Style="{StaticResource TextBlock}" Text="{Binding WebApiServerStateVm.Address}"></TextBlock>
35+
<TextBlock Style="{StaticResource LblTb}">进程内存</TextBlock>
36+
<TextBlock Style="{StaticResource TextBlock}" Text="{Binding WebApiServerStateVm.ProcessMemoryMbText}"></TextBlock>
3537
<TextBlock Style="{StaticResource LblTb}">总内存</TextBlock>
3638
<TextBlock Style="{StaticResource TextBlock}" Text="{Binding WebApiServerStateVm.TotalPhysicalMemory,Converter={StaticResource ByteToGbConverter}}"></TextBlock>
3739
<TextBlock Style="{StaticResource LblTb}">剩余内存</TextBlock>
@@ -74,6 +76,8 @@
7476
</DataGridTextColumn>
7577
<DataGridTextColumn IsReadOnly="True" Width="106" Header="群控客户端会话数" Binding="{Binding MinerStudioSessionCount}">
7678
</DataGridTextColumn>
79+
<DataGridTextColumn IsReadOnly="True" Width="90" Header="进程内存" Binding="{Binding ProcessMemoryMbText}">
80+
</DataGridTextColumn>
7781
<DataGridTextColumn IsReadOnly="True" Width="90" Header="总内存" Binding="{Binding TotalPhysicalMemory,Converter={StaticResource ByteToGbConverter}}">
7882
</DataGridTextColumn>
7983
<DataGridTextColumn IsReadOnly="True" Width="90" Header="剩余内存" Binding="{Binding AvailablePhysicalMemory,Converter={StaticResource ByteToGbConverter}}">

src/AppViews0/Views/Ucs/Toolbox.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
Width="{StaticResource ItemWidth}"
3030
Margin="4"
3131
KbButtonHoverBackground="{StaticResource KbButtonHoverBackground}"
32-
IsEnabled="{x:Static app:AppStatic.IsAmdGpu}"
32+
IsEnabled="{x:Static app:AppStatic.IsHasATIGpu}"
3333
Command="{Binding SwitchRadeonGpu}"
3434
Cursor="Hand"
3535
Background="Transparent">
@@ -51,7 +51,7 @@
5151
Width="{StaticResource ItemWidth}"
5252
Margin="4"
5353
KbButtonHoverBackground="{StaticResource KbButtonHoverBackground}"
54-
IsEnabled="{x:Static app:AppStatic.IsAmdGpu}"
54+
IsEnabled="{x:Static app:AppStatic.IsHasATIGpu}"
5555
Command="{Binding AtikmdagPatcher}"
5656
Cursor="Hand"
5757
Background="Transparent">

src/MinerClient/App.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,14 +277,14 @@ private void BuildPaths() {
277277
#endregion
278278
#region 处理开启A卡计算模式
279279
VirtualRoot.BuildCmdPath<SwitchRadeonGpuCommand>(path: message => {
280-
if (NTMinerContext.Instance.GpuSet.GpuType == GpuType.AMD) {
280+
if (AdlHelper.IsHasATIGpu) {
281281
AppRoot.SwitchRadeonGpu(message.On);
282282
}
283283
}, location: this.GetType());
284284
#endregion
285285
#region 处理A卡驱动签名
286286
VirtualRoot.BuildCmdPath<AtikmdagPatcherCommand>(path: message => {
287-
if (NTMinerContext.Instance.GpuSet.GpuType == GpuType.AMD) {
287+
if (AdlHelper.IsHasATIGpu) {
288288
AppRoot.OpenAtikmdagPatcher();
289289
}
290290
}, location: this.GetType());

src/MinerClient/Daemon/NTMinerDaemon.exe.config

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/MinerGpu/MinerGpu.csproj

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)