add benchmark

This commit is contained in:
Mateusz Poliwczak 2023-03-23 11:30:33 +01:00
parent ff350b7e71
commit 7c88c22ba2
1 changed files with 7 additions and 0 deletions

View File

@ -1164,3 +1164,10 @@ func TestNonMinimalEncodedOID(t *testing.T) {
t.Fatalf("accepted non-minimally encoded oid")
}
}
func BenchmarkObjectIdentifierString(b *testing.B) {
oidPublicKeyRSA := ObjectIdentifier{1, 2, 840, 113549, 1, 1, 1}
for i := 0; i < b.N; i++ {
_ = oidPublicKeyRSA.String()
}
}