Skip to content

Commit 5dee74e

Browse files
committed
proof size, debug output removed
1 parent b2761a6 commit 5dee74e

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ libraryDependencies ++= Seq(
1313
fork := true
1414

1515
javaOptions in run ++= Seq(
16-
"-Xms4G", "-Xmx60G", "-XX:MaxPermSize=1024M", "-XX:+UseConcMarkSweepGC")
16+
"-Xms4G", "-Xmx50G", "-XX:MaxPermSize=1024M", "-XX:+UseConcMarkSweepGC")

src/main/scala/scorex/crypto/benchmarks/PosBenchmark.scala

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ object PosBenchmark extends App {
1515

1616
implicit val hf = new Blake2b256Unsafe()
1717

18-
val InitSize = 46000000
18+
val InitSize = 600000
1919
val AdditionsPerBlock = 230000
2020
val Blocks = 200
2121

@@ -86,24 +86,26 @@ object PosBenchmark extends App {
8686
(1 to Blocks) foreach { block =>
8787

8888
val rh = prover.rootHash
89-
println(s"rh: ${Base58.encode(rh)}")
89+
// println(s"rh: ${Base58.encode(rh)}")
9090

91-
val time = genKeys.foldLeft(0L){case (t, gk) =>
91+
val (atime, asize) = genKeys.foldLeft(0L -> 0){case ((t, ps), gk) =>
9292
prover.performOneModification(gk, (k => Success(k)): UpdateFunction)
9393
val gp = prover.generateProof
94-
println(s"ph: ${Base58.encode(prover.rootHash)}")
94+
// println(s"ph: ${Base58.encode(prover.rootHash)}")
9595

9696
val verifier = new BatchAVLVerifier(rh, gp)
9797

9898
val startTime = System.currentTimeMillis()
9999
verifier.performOneModification(gk, (k => Success(k)): UpdateFunction).get
100100
val endTime = System.currentTimeMillis()
101101

102-
t + (endTime - startTime)
103-
} / genKeys.size.toFloat
102+
(t + (endTime - startTime), ps + gp.length)
103+
}
104104

105+
val time = atime / genKeys.size.toFloat
106+
val sz = asize / genKeys.size.toFloat
105107

106-
println(s"Block: $block, time: $time")
108+
println(s"Block: $block, time: $time, proofsize: $sz")
107109

108110
(0 until AdditionsPerBlock).foreach { p =>
109111
val k = genKey(block, p)

0 commit comments

Comments
 (0)