MCPcopy Create free account
hub / github.com/CovenantSQL/CovenantSQL / BenchmarkParseSignature

Function BenchmarkParseSignature

crypto/asymmetric/signature_test.go:467–487  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

465}
466
467func BenchmarkParseSignature(b *testing.B) {
468 b.Log(b.Name())
469 var hash [32]byte
470 rand.Read(hash[:])
471 sig, err := priv.Sign(hash[:])
472 buffer := sig.Serialize()
473
474 if err != nil {
475 b.Fatalf("error occurred: %v", err)
476 }
477
478 b.ReportAllocs()
479 b.ResetTimer()
480 for i := 0; i < b.N; i++ {
481 _, err := ParseSignature(buffer)
482
483 if err != nil {
484 b.Fatalf("error occurred: %v", err)
485 }
486 }
487}

Callers

nothing calls this directly

Calls 6

ParseSignatureFunction · 0.85
NameMethod · 0.80
FatalfMethod · 0.80
ReadMethod · 0.65
SignMethod · 0.65
SerializeMethod · 0.45

Tested by

no test coverage detected