for per in pers:
    result_file.write(('percentage = %g starts\n' % per))
    print 'percentage = %g starts\n' % per

    index=0

    # initialize times
    bat_update_time=0.0
    tbat_update_time=0.0

    for t in xrange(0,max_exp_times):
        print 'loop=%d' %(t+1)
        sys.stdout.flush() # flush print in nohup.out

        # create data
        pd.prepareData(num_lines,bat_file_name,tbat_file_name)

        # update data list
        update_file_name=data_dir+'update'+str(per)+suffix
        pd.prepareUpdateList(per,num_lines,update_file_name)

        # update TBAT
        start1=time.time()
        ud.updateTBAT(tbat_file_name,update_file_name)
        temp1=time.time()-start1
        tbat_update_time_table[index][t]=temp1

        # update BAT
        start2=time.time()
        # ud.updateBATFast2(bat_file_name, update_file_name)
        # ud.updateBAT1(bat_file_name,update_file_name)
Ejemplo n.º 2
0
for per in pers:
    result_file.write(('percentage = %g starts\n' % per))
    print 'percentage = %g starts\n' % per

    index=0

    # initialize times
    bat_update_time=0.0
    tbat_update_time=0.0

    for t in xrange(0,max_exp_times):
        print 'loop=%d' %(t+1)
        sys.stdout.flush() # flush print in nohup.out

        # create data
        pd.prepareData(num_lines,bat_file_name,tbat_file_name)

        # update data list
        update_file_name=data_dir+'update'+str(per)+suffix
        pd.prepareUpdateList(per,num_lines,update_file_name)

        # update TBAT
        start1=time.time()
        ud.updateTBAT(tbat_file_name,update_file_name)
        temp1=time.time()-start1
        tbat_update_time_table[index][t]=temp1

        # update BAT
        start2=time.time()
        ud.updateBAT1(bat_file_name,update_file_name)
        temp2=time.time()-start2