reproduce_plots2 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. #!/bin/bash
  2. # Replace "python3" with your Python interpreter if needed
  3. DS="Heap"
  4. Operation="Extract"
  5. cd ..
  6. for itr in $(seq 1 1); do
  7. for heapsize in $(seq 16 2 26); do
  8. echo $heapsize
  9. input_file="repro/data/log_basic_heap_extract_online_${heapsize}_itr_${itr}"
  10. output=$(python3 repro/extract_data.py "$input_file")
  11. # Read the output into an array
  12. IFS=$'\n' read -d '' -r -a values <<< "$output"
  13. # Store each value in different variables
  14. heapsize=${values[0]}
  15. optimization_flag=${values[1]}
  16. extract_wc=${values[4]}
  17. datafile="repro/experimentaldata_wallclock"
  18. python3 repro/append-experiment-results.py $datafile $DS $Operation $optimization_flag $heapsize $extract_wc
  19. input_file="repro/data/log_opt_heap_extract_online_${heapsize}_itr_${itr}"
  20. echo $input_file
  21. output=$(python3 repro/extract_data.py "$input_file")
  22. # Read the output into an array
  23. IFS=$'\n' read -d '' -r -a values <<< "$output"
  24. # Store each value in different variables
  25. heapsize=${values[0]} optimization_flag=${values[1]} extract_wc=${values[4]}
  26. datafile="repro/experimentaldata_wallclock"
  27. python3 repro/append-experiment-results.py $datafile $DS $Operation $optimization_flag $heapsize $extract_wc
  28. done
  29. done
  30. cat $datafile
  31. echo "\n\n"
  32. for itr in $(seq 1 1); do
  33. for heapsize in $(seq 16 2 26); do
  34. input_file="repro/data/log_basic_heap_extract_preproc_${heapsize}_itr_$itr"
  35. output=$(python3 repro/extract_data_from_preproc.py "$input_file")
  36. # Read the output into an array
  37. IFS=$'\n' read -d '' -r -a values <<< "$output"
  38. # Store each value in different variables
  39. heapsize=${values[0]} optimization_flag=${values[1]} preproc_wc=${values[2]}
  40. datafile="repro/experimentaldata_preproc_wallclock"
  41. python3 repro/append-experiment-results.py $datafile $DS $Operation $optimization_flag $heapsize $preproc_wc
  42. input_file="repro/data/log_opt_heap_extract_preproc_16_itr_$itr"
  43. output=$(python3 repro/extract_data_from_preproc.py "$input_file")
  44. # Read the output into an array
  45. IFS=$'\n' read -d '' -r -a values <<< "$output"
  46. # Store each value in different variables
  47. heapsize=${values[0]} optimization_flag=${values[1]} preproc_wc=${values[2]}
  48. datafile="repro/experimentaldata_preproc_wallclock"
  49. python3 repro/append-experiment-results.py $datafile $DS $Operation $optimization_flag $heapsize $preproc_wc
  50. done
  51. done
  52. cat $datafile
  53. echo "\n\n"
  54. # Replace "python3" with your Python interpreter if needed
  55. DS="Heap"
  56. Operation="Insert"
  57. for itr in $(seq 1 1); do
  58. for heapsize in $(seq 16 2 26); do
  59. input_file="repro/data/log_basic_heap_insert_online_${heapsize}_itr_$itr"
  60. output=$(python3 repro/extract_data.py "$input_file")
  61. # Read the output into an array
  62. IFS=$'\n' read -d '' -r -a values <<< "$output"
  63. # Store each value in different variables
  64. heapsize=${values[0]} optimization_flag=${values[1]} insert_wc=${values[2]}
  65. datafile="repro/experimentaldata_wallclock"
  66. python3 repro/append-experiment-results.py $datafile $DS $Operation $optimization_flag $heapsize $insert_wc
  67. input_file="repro/data/log_opt_heap_insert_online_${heapsize}_itr_$itr"
  68. output=$(python3 repro/extract_data.py "$input_file")
  69. # Read the output into an array
  70. IFS=$'\n' read -d '' -r -a values <<< "$output"
  71. # Store each value in different variables
  72. heapsize=${values[0]} optimization_flag=${values[1]} insert_wc=${values[2]}
  73. datafile="repro/experimentaldata_wallclock"
  74. python3 repro/append-experiment-results.py $datafile $DS $Operation $optimization_flag $heapsize $insert_wc
  75. done
  76. done
  77. cat $datafile
  78. echo "\n---------\n"
  79. for itr in $(seq 1 1); do
  80. for heapsize in $(seq 16 2 26); do
  81. echo ${heapsize}
  82. input_file="repro/data/log_basic_heap_insert_preproc_${heapsize}_itr_$itr"
  83. output=$(python3 repro/extract_data_from_preproc.py "$input_file")
  84. # Read the output into an array
  85. IFS=$'\n' read -d '' -r -a values <<< "$output"
  86. # Store each value in different variables
  87. heapsize=${values[0]} optimization_flag=${values[1]} preproc_wc=${values[2]}
  88. datafile="repro/experimentaldata_preproc_wallclock"
  89. python3 repro/append-experiment-results.py $datafile $DS $Operation $optimization_flag $heapsize $preproc_wc
  90. input_file="repro/data/log_opt_heap_insert_preproc_${heapsize}_itr_$itr"
  91. output=$(python3 repro/extract_data_from_preproc.py "$input_file")
  92. # Read the output into an array
  93. IFS=$'\n' read -d '' -r -a values <<< "$output"
  94. # Store each value in different variables
  95. heapsize=${values[0]} optimization_flag=${values[1]} preproc_wc=${values[2]}
  96. datafile="repro/experimentaldata_preproc_wallclock"
  97. python3 repro/append-experiment-results.py $datafile $DS $Operation $optimization_flag $heapsize $preproc_wc
  98. done
  99. done
  100. cat $datafile