@@ -144,7 +144,7 @@ protected override string BenchmarkCreateCommandLine(Algorithm algorithm, int ti
144
144
}
145
145
146
146
protected override bool BenchmarkParseLine ( string outdata ) {
147
- if ( outdata . Contains ( "Average hashrate:" ) && outdata . Contains ( "/s" ) ) {
147
+ if ( outdata . Contains ( "Average hashrate:" ) && outdata . Contains ( "/s" ) && BenchmarkAlgorithm . NiceHashID != AlgorithmType . DaggerHashimoto ) {
148
148
int i = outdata . IndexOf ( ": " ) ;
149
149
int k = outdata . IndexOf ( "/s" ) ;
150
150
@@ -161,6 +161,30 @@ protected override bool BenchmarkParseLine(string outdata) {
161
161
speed *= 1000000 ;
162
162
163
163
BenchmarkAlgorithm . BenchmarkSpeed = speed ;
164
+ return true ;
165
+ } else if ( outdata . Contains ( String . Format ( "GPU{0}" , MiningSetup . MiningPairs [ 0 ] . Device . ID ) ) && outdata . Contains ( "s):" ) && BenchmarkAlgorithm . NiceHashID == AlgorithmType . DaggerHashimoto ) {
166
+ int i = outdata . IndexOf ( "s):" ) ;
167
+ int k = outdata . IndexOf ( "(avg)" ) ;
168
+
169
+ // save speed
170
+ string hashSpeed = outdata . Substring ( i + 3 , k - i + 3 ) . Trim ( ) ;
171
+ hashSpeed = hashSpeed . Replace ( "(avg):" , "" ) ;
172
+ Helpers . ConsolePrint ( "BENCHMARK" , "Final Speed: " + hashSpeed ) ;
173
+
174
+ double mult = 1 ;
175
+ if ( hashSpeed . Contains ( "K" ) ) {
176
+ hashSpeed = hashSpeed . Replace ( "K" , "" ) ;
177
+ mult = 1000 ;
178
+ } else if ( hashSpeed . Contains ( "M" ) ) {
179
+ hashSpeed = hashSpeed . Replace ( "M" , "" ) ;
180
+ mult = 1000000 ;
181
+ }
182
+
183
+ hashSpeed = hashSpeed . Substring ( 0 , hashSpeed . IndexOf ( " " ) ) ;
184
+ double speed = Double . Parse ( hashSpeed , CultureInfo . InvariantCulture ) * mult ;
185
+
186
+ BenchmarkAlgorithm . BenchmarkSpeed = speed ;
187
+
164
188
return true ;
165
189
}
166
190
return false ;
0 commit comments