Skip to content

Commit 1793d56

Browse files
committed
adapt timed benchmark mode
1 parent 8a1492b commit 1793d56

File tree

1 file changed

+2
-2
lines changed
  • Modules/Examples/Protocol Benchmarks/src/main/scala/probench/clients

1 file changed

+2
-2
lines changed

Modules/Examples/Protocol Benchmarks/src/main/scala/probench/clients/Client.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ trait Client(name: Uid) {
3636
println(s"Did ${times.toDouble / ((System.nanoTime() - start) / 1_000_000_000d)} ops/s")
3737
}
3838

39-
def mixed(min: Int, max: Int, times: Int = 1): Unit = {
39+
def mixed(min: Int, max: Int, times: Int): Unit = {
4040
val start = System.nanoTime()
4141
for i <- 1 to times do {
4242
val num = Math.round(Math.random() * (max - min) + min).toInt
@@ -117,7 +117,7 @@ trait Client(name: Uid) {
117117
mode match
118118
case BenchmarkMode.Read => multiget("key%n", 10, Math.round(Math.random() * 990).toInt)
119119
case BenchmarkMode.Write => multiput("key%n", "value%n", 10, Math.round(Math.random() * 990).toInt)
120-
case BenchmarkMode.Mixed => mixed(1, 10)
120+
case BenchmarkMode.Mixed => mixed(1, 10, 10)
121121
queries += 10
122122
}
123123

0 commit comments

Comments
 (0)