peek-results 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #!/bin/bash
  2. # Peek at the results of an ongoing repro run, without touching the
  3. # dockers. Note: you will need to be able to run the parse_logs scripts
  4. # on the *host* (i.e., you will need perl installed on the host),
  5. # instead of in the dockers as usual.
  6. # cd into the directory containing this script (from the bash faq 028)
  7. if [[ $BASH_SOURCE = */* ]]; then
  8. cd -- "${BASH_SOURCE%/*}/" || exit
  9. fi
  10. numops=128
  11. if [ "$1" != "" ]; then
  12. numops="$1"
  13. fi
  14. outputfile=$$.peek.log
  15. export DUORAM_PARSE_HOST=1
  16. export FLORAM_PARSE_HOST=1
  17. export ORAM_PARSE_HOST=1
  18. cleanup() {
  19. rm -f $outputfile
  20. exit
  21. }
  22. trap cleanup EXIT SIGINT
  23. # Duoram
  24. ( cd ../Docker && ./repro none ${numops} ) > $outputfile
  25. # Floram
  26. ( cd floram-docker && ./repro none ${numops} ) >> $outputfile
  27. # Circuit ORAM
  28. ( cd circuit-oram-docker/docker && ./repro none ${numops} ) >> $outputfile
  29. # Show stanzas starting with "# $1" and ending with "# " in the input
  30. showstanza() {
  31. echo "# $1"
  32. sed -n "/# $1/,/# /{//!p;}"
  33. }
  34. echo
  35. echo "===== Collated output ====="
  36. echo
  37. cat $outputfile | showstanza 'Figure 7(a)'
  38. cat $outputfile | showstanza 'Figure 7(b)'
  39. cat $outputfile | showstanza 'Figure 7(c)'
  40. cat $outputfile | showstanza 'Figure 8(a)'
  41. cat $outputfile | showstanza 'Figure 8(b)'
  42. cat $outputfile | showstanza 'Figure 8(c)'
  43. cat $outputfile | showstanza 'Figure 9(a)'
  44. cat $outputfile | showstanza 'Figure 9(b)'
  45. cat $outputfile | showstanza 'Figure 9(c)'
  46. if [ "$DUORAM_EXTENDED_PLOTS" = "1" ]; then
  47. # Also show the plots for the extended version (Figures 11, 12)
  48. cat $outputfile | showstanza 'Figure 11(a)'
  49. cat $outputfile | showstanza 'Figure 11(b)'
  50. cat $outputfile | showstanza 'Figure 11(c)'
  51. cat $outputfile | showstanza 'Figure 12(a)'
  52. cat $outputfile | showstanza 'Figure 12(b)'
  53. cat $outputfile | showstanza 'Figure 12(c)'
  54. fi