Browse Source

Merge pull request #19 from iden3/fix/pk-parse-benchmarks

Fix pk parser benchmarks
feature/missingPolsC
Eduard S 4 years ago
committed by GitHub
parent
commit
e652f34753
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 3 deletions
  1. +8
    -3
      parsers/parsers_test.go

+ 8
- 3
parsers/parsers_test.go

@ -297,17 +297,22 @@ func benchmarkParsePk(b *testing.B, circuit string) {
b.Run("ParsePkJson "+circuit, func(b *testing.B) {
for i := 0; i < b.N; i++ {
ParsePkBin(pkBinFile)
_, err = ParsePk(pkJson)
require.Nil(b, err)
}
})
b.Run("ParsePkBin "+circuit, func(b *testing.B) {
for i := 0; i < b.N; i++ {
ParsePk(pkJson)
pkBinFile.Seek(0, 0)
_, err = ParsePkBin(pkBinFile)
require.Nil(b, err)
}
})
b.Run("ParsePkGoBin "+circuit, func(b *testing.B) {
for i := 0; i < b.N; i++ {
ParsePkGoBin(pkBinFile)
pkGoBinFile.Seek(0, 0)
_, err = ParsePkGoBin(pkGoBinFile)
require.Nil(b, err)
}
})
}

Loading…
Cancel
Save