@@ -50,17 +50,17 @@ sha256 98952.23k 300483.21k 717624.35k 1098886.72k 1296898.18k
50
50
IEnumerable < Metric > metrics = parser . Parse ( ) ;
51
51
52
52
Assert . IsNotNull ( metrics ) ;
53
- Assert . IsTrue ( metrics . Count ( ) == 6 ) ;
53
+ Assert . AreEqual ( 6 , metrics . Count ( ) ) ;
54
54
Assert . IsTrue ( metrics . All ( m => m . Unit == MetricUnit . KilobytesPerSecond ) ) ;
55
55
56
- OpenSslMetricsParserTests . AssertMetricsMatch ( "aes -256-cbc " , metrics , new Dictionary < string , double >
56
+ OpenSslMetricsParserTests . AssertMetricsMatch ( "AES -256-CBC " , metrics , new Dictionary < string , double >
57
57
{
58
- { "aes -256-cbc 16-byte" , 1109022.36 } ,
59
- { "aes -256-cbc 64-byte" , 1209391.13 } ,
60
- { "aes -256-cbc 256-byte" , 1232451.87 } ,
61
- { "aes -256-cbc 1024-byte" , 1237247.28 } ,
62
- { "aes -256-cbc 8192-byte" , 1239375.05 } ,
63
- { "aes -256-cbc 16384-byte" , 1239090.79 } ,
58
+ { "AES -256-CBC 16-byte" , 1109022.36 } ,
59
+ { "AES -256-CBC 64-byte" , 1209391.13 } ,
60
+ { "AES -256-CBC 256-byte" , 1232451.87 } ,
61
+ { "AES -256-CBC 1024-byte" , 1237247.28 } ,
62
+ { "AES -256-CBC 8192-byte" , 1239375.05 } ,
63
+ { "AES -256-CBC 16384-byte" , 1239090.79 } ,
64
64
} ) ;
65
65
}
66
66
@@ -194,6 +194,34 @@ rsa 2048 bits 0.000820s 0.000024s 1219.7 41003.9
194
194
} ) ;
195
195
}
196
196
197
+ [ Test ]
198
+ public void OpenSslParserParsesResultsCorrectly_ed25519_Scenario ( )
199
+ {
200
+ /* In this scenario, we are evaluating a single cipher as well as all byte buffer sizes.
201
+
202
+ Example:
203
+ sign verify sign/s verify/s
204
+ 253 bits EdDSA (Ed25519) 0.0000s 0.0000s 261116.2 78003.2
205
+ */
206
+
207
+ OpenSslMetricsParser parser = new OpenSslMetricsParser (
208
+ File . ReadAllText ( Path . Combine ( OpenSslMetricsParserTests . examplesDir , "OpenSSL-speed-multi-ed25519.txt" ) ) ,
209
+ "speed -multi 16 -seconds 5 ed25519" ) ;
210
+
211
+ IEnumerable < Metric > metrics = parser . Parse ( ) ;
212
+
213
+ Assert . IsNotNull ( metrics ) ;
214
+ Assert . AreEqual ( 4 , metrics . Count ( ) ) ;
215
+
216
+ OpenSslMetricsParserTests . AssertMetricsMatch ( "253 bits EdDSA (Ed25519)" , metrics , new Dictionary < string , double >
217
+ {
218
+ { "253 bits EdDSA (Ed25519) sign" , 0 } ,
219
+ { "253 bits EdDSA (Ed25519) verify" , 0 } ,
220
+ { "253 bits EdDSA (Ed25519) sign/s" , 261116.2 } ,
221
+ { "253 bits EdDSA (Ed25519) verify/s" , 78003.2 }
222
+ } ) ;
223
+ }
224
+
197
225
[ Test ]
198
226
public void OpenSslParserParsesResultsCorrectly_AllCiphers_Scenario ( )
199
227
{
@@ -213,7 +241,7 @@ sha256 98952.23k 300483.21k 717624.35k 1098886.72k 1296898.18k
213
241
IEnumerable < Metric > metrics = parser . Parse ( ) ;
214
242
215
243
Assert . IsNotNull ( metrics ) ;
216
- Assert . IsTrue ( metrics . Count ( ) == 112 ) ;
244
+ Assert . AreEqual ( 224 , metrics . Count ( ) ) ;
217
245
// Assert.IsTrue(metrics.All(m => m.Unit == MetricUnit.KilobytesPerSecond)); --> changed with inclusion of RSA coverage
218
246
219
247
OpenSslMetricsParserTests . AssertMetricsMatch ( "md5" , metrics , new Dictionary < string , double >
@@ -432,7 +460,7 @@ sha256 1316783.17k
432
460
IEnumerable < Metric > metrics = parser . Parse ( ) ;
433
461
434
462
Assert . IsNotNull ( metrics ) ;
435
- Assert . IsTrue ( metrics . Count ( ) == 42 ) ;
463
+ Assert . AreEqual ( 154 , metrics . Count ( ) ) ;
436
464
// Assert.IsTrue(metrics.All(m => m.Unit == MetricUnit.KilobytesPerSecond)); --> changed with inclusion of RSA coverage
437
465
438
466
OpenSslMetricsParserTests . AssertMetricsMatch ( "md5" , metrics , new Dictionary < string , double >
@@ -526,7 +554,7 @@ type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 1
526
554
IEnumerable < Metric > metrics = parser . Parse ( ) ;
527
555
528
556
Assert . IsNotNull ( metrics ) ;
529
- Assert . IsTrue ( metrics . Count ( ) == 94 ) ;
557
+ Assert . AreEqual ( 206 , metrics . Count ( ) ) ;
530
558
// Assert.IsTrue(metrics.All(m => m.Unit == MetricUnit.KilobytesPerSecond)); --> changed with inclusion of RSA coverage
531
559
532
560
OpenSslMetricsParserTests . AssertMetricsMatch ( "md5" , metrics , new Dictionary < string , double >
@@ -650,6 +678,22 @@ type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 1
650
678
{ "rand 1024-byte" , 1062619.07 } ,
651
679
{ "rand 8192-byte" , 4221050.33 }
652
680
} ) ;
681
+
682
+ OpenSslMetricsParserTests . AssertMetricsMatch ( "rsa 512" , metrics , new Dictionary < string , double >
683
+ {
684
+ { "rsa 512 bits sign" , 0.000038 } ,
685
+ { "rsa 512 bits verify" , 0.000002 } ,
686
+ { "rsa 512 bits sign/s" , 26538.8 } ,
687
+ { "rsa 512 bits verify/s" , 432400.4 }
688
+ } ) ;
689
+
690
+ OpenSslMetricsParserTests . AssertMetricsMatch ( "256 bits SM2 (CurveSM2)" , metrics , new Dictionary < string , double >
691
+ {
692
+ { "256 bits SM2 (CurveSM2) sign" , 0.0003 } ,
693
+ { "256 bits SM2 (CurveSM2) verify" , 0.0003 } ,
694
+ { "256 bits SM2 (CurveSM2) sign/s" , 2862.3 } ,
695
+ { "256 bits SM2 (CurveSM2) verify/s" , 3079.5 }
696
+ } ) ;
653
697
}
654
698
655
699
[ Test ]
0 commit comments