github.com/Team-Kujira/tendermint@v0.34.24-indexer/crypto/ed25519/bench_test.go (about)

     1  package ed25519
     2  
     3  import (
     4  	"io"
     5  	"testing"
     6  
     7  	"github.com/tendermint/tendermint/crypto"
     8  	"github.com/tendermint/tendermint/crypto/internal/benchmarking"
     9  )
    10  
    11  func BenchmarkKeyGeneration(b *testing.B) {
    12  	benchmarkKeygenWrapper := func(reader io.Reader) crypto.PrivKey {
    13  		return genPrivKey(reader)
    14  	}
    15  	benchmarking.BenchmarkKeyGeneration(b, benchmarkKeygenWrapper)
    16  }
    17  
    18  func BenchmarkSigning(b *testing.B) {
    19  	priv := GenPrivKey()
    20  	benchmarking.BenchmarkSigning(b, priv)
    21  }
    22  
    23  func BenchmarkVerification(b *testing.B) {
    24  	priv := GenPrivKey()
    25  	benchmarking.BenchmarkVerification(b, priv)
    26  }