mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 06:42:16 +00:00
27 lines
581 B
Go
27 lines
581 B
Go
|
package secp256k1
|
||
|
|
||
|
import (
|
||
|
"io"
|
||
|
"testing"
|
||
|
|
||
|
"github.com/tendermint/tendermint/crypto"
|
||
|
"github.com/tendermint/tendermint/crypto/internal/benchmarking"
|
||
|
)
|
||
|
|
||
|
func BenchmarkKeyGeneration(b *testing.B) {
|
||
|
benchmarkKeygenWrapper := func(reader io.Reader) crypto.PrivKey {
|
||
|
return genPrivKey(reader)
|
||
|
}
|
||
|
benchmarking.BenchmarkKeyGeneration(b, benchmarkKeygenWrapper)
|
||
|
}
|
||
|
|
||
|
func BenchmarkSigning(b *testing.B) {
|
||
|
priv := GenPrivKey()
|
||
|
benchmarking.BenchmarkSigning(b, priv)
|
||
|
}
|
||
|
|
||
|
func BenchmarkVerification(b *testing.B) {
|
||
|
priv := GenPrivKey()
|
||
|
benchmarking.BenchmarkVerification(b, priv)
|
||
|
}
|