Index: tests/flow_sensor_data_processor.py =================================================================== diff -u -rd9310e1930f9237650263dcad07f676439468b50 -r2011b5c06793fc8e98f9e43113b15cff016024a1 --- tests/flow_sensor_data_processor.py (.../flow_sensor_data_processor.py) (revision d9310e1930f9237650263dcad07f676439468b50) +++ tests/flow_sensor_data_processor.py (.../flow_sensor_data_processor.py) (revision 2011b5c06793fc8e98f9e43113b15cff016024a1) @@ -1,10 +1,15 @@ import math import os +from time import time +start_time = time() + +# This is the address that all the flow log files are located log_files_address = '/home/fw/Desktop/Users/DaraN/Flow Sensor Data' write_file = '/home/fw/Desktop/Users/DaraN/Flow Sensor Data/flow_results.csv' + # Check if the report file exists. If it does, remove it first if os.path.exists(write_file): os.remove(write_file) @@ -32,6 +37,7 @@ file_name = os.path.splitext(log_file)[0] # Remove all the addresses before the file name (i.e. home/folder/run_pump will be run_pump) file_name = file_name.split('/')[-1] + print(file_name) # Add the header to the run w.write(file_name + '\r') @@ -84,10 +90,13 @@ flow, avg_measured_flow, load_cell_flow, error)) w.write(info + '\r') - print(info) + # Done with this calculations, reset all the variables for the next fill initial_fill_time = 0 initial_fill_load_cell = 0 is_it_fill_time = False flow_running_sum = 0 initial_fill_delay = 0 + +elapsed_time = ('Elapsed Time: {} seconds!'.format(int(time() - start_time))) +print(elapsed_time)