mirror of https://github.com/golang/go.git
add benchmark
This commit is contained in:
parent
ff350b7e71
commit
7c88c22ba2
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue