-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7e78049
commit 74a461c
Showing
11 changed files
with
147 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
multiput key value 100 | ||
benchmark | ||
multiput keyX%n valueX%n 10000 | ||
# multiget keyX%n 1000 | ||
save-benchmark bench-results/ | ||
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# wait-for-res false | ||
multiput key%n valueX%n 200 | ||
multiget key%n 200 | ||
multiput key%n valueX%n 1000 | ||
multiget key%n 1000 | ||
# wait | ||
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# wait-for-res false | ||
multiput key%n valueY%n 200 | ||
multiget key%n 200 | ||
multiput key%n valueY%n 1000 | ||
multiget key%n 1000 | ||
# wait | ||
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# wait-for-res false | ||
multiput key%n valueZ%n 200 | ||
multiget key%n 200 | ||
multiput key%n valueZ%n 1000 | ||
multiget key%n 1000 | ||
# wait | ||
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
Modules/Examples/Protocol Benchmarks/src/main/scala/probench/benchmark/BenchmarkData.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package probench.benchmark | ||
|
||
case class BenchmarkData( | ||
name: String, | ||
op: String, | ||
args: String, | ||
sendTime: Long, | ||
receiveTime: Long, | ||
latency: Double, | ||
unit: String | ||
) | ||
|
||
object BenchmarkData { | ||
val header: Seq[String] = Seq("name", "op", "args", "send-time", "receive-time", "latency", "unit") | ||
} |
30 changes: 30 additions & 0 deletions
30
Modules/Examples/Protocol Benchmarks/src/main/scala/probench/benchmark/CSVWriter.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package probench.benchmark | ||
|
||
import java.io.{BufferedWriter, FileOutputStream, OutputStreamWriter} | ||
import java.nio.file.Path | ||
|
||
class CSVWriter( | ||
private val separator: String, | ||
private val path: Path, | ||
private val fileName: String, | ||
private val header: Seq[String] | ||
) { | ||
path.toFile.mkdirs() | ||
private val file = path.resolve(s"$fileName.csv").toFile | ||
private val writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file))) | ||
|
||
writer.write(header.mkString(separator)) | ||
writer.write("\n") | ||
|
||
def writeRow(data: String*): Unit = { | ||
writer.write(data.mkString(separator)) | ||
writer.write("\n") | ||
} | ||
|
||
def close(): Unit = { | ||
writer.flush() | ||
println(s"Saving to ${path.toAbsolutePath}") | ||
writer.close() | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters