@@ -24,9 +24,6 @@ public class BenchmarkHandler : IBenchmarkComunicator
24
24
private Algorithm _currentAlgorithm ;
25
25
private Miner _currentMiner ;
26
26
private readonly BenchmarkPerformanceType _performanceType ;
27
- private ClaymoreZcashBenchHelper _claymoreZcashStatus ;
28
-
29
- private CpuBenchHelper _cpuBenchmarkStatus ;
30
27
31
28
private readonly PowerHelper _powerHelper ;
32
29
@@ -69,44 +66,6 @@ void IBenchmarkComunicator.OnBenchmarkComplete(bool success, string status)
69
66
if ( ! BenchmarkManager . InBenchmark ) return ;
70
67
71
68
var rebenchSame = false ;
72
- if ( success && _cpuBenchmarkStatus != null && _cpuAlgos . Contains ( _currentAlgorithm . NiceHashID ) &&
73
- _currentAlgorithm . MinerBaseType == MinerBaseType . XmrStak )
74
- {
75
- _cpuBenchmarkStatus . SetNextSpeed ( _currentAlgorithm . BenchmarkSpeed ) ;
76
- rebenchSame = _cpuBenchmarkStatus . HasTest ( ) ;
77
- _currentAlgorithm . LessThreads = _cpuBenchmarkStatus . LessTreads ;
78
- if ( rebenchSame == false )
79
- {
80
- _cpuBenchmarkStatus . FindFastest ( ) ;
81
- _currentAlgorithm . BenchmarkSpeed = _cpuBenchmarkStatus . GetBestSpeed ( ) ;
82
- _currentAlgorithm . LessThreads = _cpuBenchmarkStatus . GetLessThreads ( ) ;
83
- }
84
- }
85
-
86
- if ( _claymoreZcashStatus != null && _currentAlgorithm . MinerBaseType == MinerBaseType . Claymore &&
87
- _currentAlgorithm . NiceHashID == AlgorithmType . Equihash )
88
- {
89
- if ( _claymoreZcashStatus . HasTest ( ) )
90
- {
91
- _currentMiner = MinerFactory . CreateMiner ( Device , _currentAlgorithm ) ;
92
- rebenchSame = true ;
93
- //System.Threading.Thread.Sleep(1000*60*5);
94
- _claymoreZcashStatus . SetSpeed ( _currentAlgorithm . BenchmarkSpeed ) ;
95
- _claymoreZcashStatus . SetNext ( ) ;
96
- _currentAlgorithm . ExtraLaunchParameters = _claymoreZcashStatus . GetTestExtraParams ( ) ;
97
- Helpers . ConsolePrint ( "ClaymoreAMD_Equihash" , _currentAlgorithm . ExtraLaunchParameters ) ;
98
- _currentMiner . InitBenchmarkSetup ( new MiningPair ( Device , _currentAlgorithm ) ) ;
99
- }
100
-
101
- if ( _claymoreZcashStatus . HasTest ( ) == false )
102
- {
103
- rebenchSame = false ;
104
- // set fastest mode
105
- _currentAlgorithm . BenchmarkSpeed = _claymoreZcashStatus . GetFastestTime ( ) ;
106
- _currentAlgorithm . ExtraLaunchParameters = _claymoreZcashStatus . GetFastestExtraParams ( ) ;
107
- }
108
- }
109
-
110
69
var power = _powerHelper . Stop ( ) ;
111
70
112
71
var dualAlgo = _currentAlgorithm as DualAlgorithm ;
@@ -141,18 +100,9 @@ void IBenchmarkComunicator.OnBenchmarkComplete(bool success, string status)
141
100
{
142
101
_powerHelper . Start ( ) ;
143
102
144
- if ( _cpuBenchmarkStatus != null )
145
- {
146
- _currentMiner . BenchmarkStart ( _cpuBenchmarkStatus . Time , this ) ;
147
- }
148
- else if ( _claymoreZcashStatus != null )
103
+ if ( dualAlgo != null && dualAlgo . TuningEnabled )
149
104
{
150
- _currentMiner . BenchmarkStart ( _claymoreZcashStatus . Time , this ) ;
151
- }
152
- else if ( dualAlgo != null && dualAlgo . TuningEnabled )
153
- {
154
- var time = ConfigManager . GeneralConfig . BenchmarkTimeLimits
155
- . GetBenchamrktime ( _performanceType , Device . DeviceGroupType ) ;
105
+ var time = BenchmarkTimes . GetTime ( _performanceType , Device . DeviceType ) ;
156
106
_currentMiner . BenchmarkStart ( time , this ) ;
157
107
}
158
108
}
@@ -178,43 +128,14 @@ private void NextBenchmark()
178
128
if ( Device != null && _currentAlgorithm != null )
179
129
{
180
130
_currentMiner = MinerFactory . CreateMiner ( Device , _currentAlgorithm ) ;
181
- /*
182
- if (_currentAlgorithm.MinerBaseType == MinerBaseType.XmrStak && _currentAlgorithm.NiceHashID == AlgorithmType.CryptoNight
183
- && string.IsNullOrEmpty(_currentAlgorithm.ExtraLaunchParameters)
184
- && _currentAlgorithm.ExtraLaunchParameters.Contains("enable_ht=true") == false) {
185
- _cpuBenchmarkStatus = new CPUBenchmarkStatus(Globals.ThreadsPerCPU);
186
- _currentAlgorithm.LessThreads = _cpuBenchmarkStatus.LessTreads;
187
- } else {
188
- _cpuBenchmarkStatus = null;
189
- }
190
- */
191
- _cpuBenchmarkStatus = null ;
192
-
193
- if ( _currentAlgorithm . MinerBaseType == MinerBaseType . Claymore &&
194
- _currentAlgorithm . NiceHashID == AlgorithmType . Equihash &&
195
- _currentAlgorithm . ExtraLaunchParameters != null &&
196
- ! _currentAlgorithm . ExtraLaunchParameters . Contains ( "-asm" ) )
197
- {
198
- _claymoreZcashStatus = new ClaymoreZcashBenchHelper ( _currentAlgorithm . ExtraLaunchParameters ) ;
199
- _currentAlgorithm . ExtraLaunchParameters = _claymoreZcashStatus . GetTestExtraParams ( ) ;
200
- }
201
- else
202
- {
203
- _claymoreZcashStatus = null ;
204
- }
205
-
206
131
if ( _currentAlgorithm is DualAlgorithm dualAlgo && dualAlgo . TuningEnabled ) dualAlgo . StartTuning ( ) ;
207
132
}
208
133
209
134
if ( _currentMiner != null && _currentAlgorithm != null && Device != null )
210
135
{
211
136
_currentMiner . InitBenchmarkSetup ( new MiningPair ( Device , _currentAlgorithm ) ) ;
212
137
213
- var time = ConfigManager . GeneralConfig . BenchmarkTimeLimits
214
- . GetBenchamrktime ( _performanceType , Device . DeviceGroupType ) ;
215
- //currentConfig.TimeLimit = time;
216
- if ( _cpuBenchmarkStatus != null ) _cpuBenchmarkStatus . Time = time ;
217
- if ( _claymoreZcashStatus != null ) _claymoreZcashStatus . Time = time ;
138
+ var time = BenchmarkTimes . GetTime ( _performanceType , Device . DeviceType ) ;
218
139
219
140
// dagger about 4 minutes
220
141
//var showWaitTime = _currentAlgorithm.NiceHashID == AlgorithmType.DaggerHashimoto ? 4 * 60 : time;
0 commit comments