Skip to content

Commit

Permalink
measuring performance
Browse files Browse the repository at this point in the history
  • Loading branch information
nermin committed May 7, 2011
1 parent f13fde5 commit 3b06e52
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Binary file modified lib/rfas-ventsink_2.8.1-1.0.jar
Binary file not shown.
7 changes: 6 additions & 1 deletion run.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#!/bin/bash
if [ $# -ne 1 ]
then
echo "Usage `basename $0` <number of trials>"
exit
fi
export LD_LIBRARY_PATH=/usr/local/lib
java -jar -Djava.library.path=/usr/local/lib -Drequest.bind=5557 -Dresponse.bind=5558 -Dworker.timeout.millis=30000 birthday-paradox-assembly-1.0.jar 2000
java -jar -Djava.library.path=/usr/local/lib -Drequest.bind=5557 -Dresponse.bind=5558 -Dworker.timeout.millis=30000 birthday-paradox-assembly-1.0.jar $1
3 changes: 3 additions & 0 deletions src/main/scala/org/cs264/bp/BirthdayParadox.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ object BirthdayParadox {
val numOfTrials = args(0).toInt
val l = (2 to 100).toList
val gl = l.grid
val startTime = System.currentTimeMillis
val results = gl.map(run(_, numOfTrials))
val endTime = System.currentTimeMillis
val percentages = results.map(_ / numOfTrials.toFloat * 100)
writeCSV(l, percentages)
println("Total time: " + (endTime - startTime)/1000F + "s.")
System.exit(0)
}

Expand Down

0 comments on commit 3b06e52

Please sign in to comment.