#!/bin/bash # This script was created for testing the running time of different FIM implementation on # different databases with different parameteres (support threshold in our case). # The script needs one parameter, that is the name of the file the test result are written to. # For example: ./test_running_time_input test_results.txt # author: Ferenc Bodon # email: bodon@cs.bme.hu # date: 04/03/2004 result_file=$1 email_address=your_name@domain datadir=adat/ program_vector="apriori_test_1/apriori apriori_test_2/apriori apriori_test_3/apriori" database[1]=T40I10D100K.dat minsupp_vector[1]="0.05 0.02 0.01 0.0085 0.0073 0.0065 0.006" database[2]=kosarak.txt minsupp_vector[2]="0.05 0.003 0.002 0.001 0.0009 0.00087 0.00085" database[3]=T10I4D100K.dat minsupp_vector[3]="0.001 0.0004 0.0002 0.00014 0.00008 0.000065 0.00005" database[4]=connect.dat minsupp_vector[4]="0.9 0.83 0.75 0.71 0.67 0.655 0.64" database[5]=pumsb.dat minsupp_vector[5]="0.9 0.81 0.75 0.71 0.69 0.678 0.67" database[6]=accidents.dat minsupp_vector[6]="0.7 0.5 0.4 0.36 0.33 0.31 0.3" database[7]=retail.dat minsupp_vector[7]="0.00075 0.00025 0.00015 0.00008 0.00006 0.000048 0.00004" database[8]=BMS-POS_mb.dat minsupp_vector[8]="0.01 0.002 0.0009 0.0006 0.00035 0.00026 0.0002" database[9]=BMS-WebView-1_mb.dat minsupp_vector[9]="0.0007 0.00064 0.00062 0.0006 0.00058 0.000568 0.00056" database[10]=BMS-WebView-2_mb.dat minsupp_vector[10]="0.001 0.0008 0.0004 0.0003 0.00018 0.00013 0.0001" echo RUNNING TIMES \(USER + SYSTEM\) >>$result_file for((index=9;$index<11;index++)); do echo ${database[$index]} database>>$result_file; for minsupp in ${minsupp_vector[$index]}; do echo >>$result_file; echo minsupp: $minsupp>>$result_file; for program in $program_vector; do /usr/bin/time -f "%U + %S" -o temp_time.txt $program ${datadir}${database[$index]} output.txt $minsupp; bc < temp_time.txt >> $result_file; done; done; echo -------------------------- >>$result_file; done mail -s "Simulation has finished!" $email_address<$result_file