You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
579 B

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