reproduce_plots_bs 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #!/bin/bash
  2. # Replace "python3" with your Python interpreter if needed
  3. DS="BS"
  4. Operation="Search"
  5. cd ..
  6. touch "repro/experimentaldata_bs_preproc_wallclock" "repro/experimentaldata_bs_wallclock"
  7. rm "repro/experimentaldata_bs_preproc_wallclock" "repro/experimentaldata_bs_wallclock"
  8. touch "repro/experimentaldata_bs_preproc_wallclock" "repro/experimentaldata_bs_wallclock"
  9. nitrs=2
  10. minsize=16
  11. maxsize=24
  12. stepsize=2
  13. for itr in $(seq 1 $nitrs); do
  14. for bssize in $(seq $minsize $stepsize $maxsize); do
  15. input_file="repro/data/log_basic_bs_online_${bssize}_itr_${itr}"
  16. echo $input_file
  17. output=$(python3 repro/extract_data_bs.py "$input_file")
  18. # Read the output into an array
  19. IFS=$'\n' read -d '' -r -a values <<< "$output"
  20. # Store each value in different variables
  21. bssize=$bssize
  22. optimization_flag=0
  23. extract_wc=${values[1]}
  24. datafile="repro/experimentaldata_bs_wallclock"
  25. python3 repro/append-experiment-results.py $datafile $DS $Operation $optimization_flag $bssize $extract_wc
  26. input_file="repro/data/log_opt_bs_online_${bssize}_itr_${itr}"
  27. echo $input_file
  28. output=$(python3 repro/extract_data_bs.py "$input_file")
  29. # Read the output into an array
  30. IFS=$'\n' read -d '' -r -a values <<< "$output"
  31. # Store each value in different variables
  32. bssize=$bssize optimization_flag=1 extract_wc=${values[1]}
  33. datafile="repro/experimentaldata_bs_wallclock"
  34. python3 repro/append-experiment-results.py $datafile $DS $Operation $optimization_flag $bssize $extract_wc
  35. done
  36. done
  37. echo "OnlineTable"
  38. cat $datafile
  39. echo -e "\n\n"
  40. for itr in $(seq 1 $nitrs); do
  41. for bssize in $(seq $minsize $stepsize $maxsize); do
  42. input_file="repro/data/log_basic_bs_preproc_${bssize}_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. bssize=$bssize optimization_flag=0 preproc_wc=${values[2]}
  48. datafile="repro/experimentaldata_bs_preproc_wallclock"
  49. python3 repro/append-experiment-results.py $datafile $DS $Operation $optimization_flag $bssize $preproc_wc
  50. input_file="repro/data/log_opt_bs_preproc_${bssize}_itr_$itr"
  51. output=$(python3 repro/extract_data_from_preproc.py "$input_file")
  52. # Read the output into an array
  53. IFS=$'\n' read -d '' -r -a values <<< "$output"
  54. # Store each value in different variables
  55. bssize=$bssize optimization_flag=1 preproc_wc=${values[2]}
  56. datafile="repro/experimentaldata_bs_preproc_wallclock"
  57. python3 repro/append-experiment-results.py $datafile $DS $Operation $optimization_flag $bssize $preproc_wc
  58. done
  59. done
  60. echo "PrprocTable"
  61. cat $datafile
  62. echo -e "\n\n"