You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
1.0 KiB
24 lines
1.0 KiB
import csv |
|
import datetime |
|
from services import io_services, log_services, data_services |
|
# import pdb |
|
|
|
def main(): |
|
raw_data_path = "data/test-data-lite.csv" |
|
rps_save_path = "data/results/readings-per-sec.csv" |
|
rps_above_thresh = "data/results/readings_above_threshold.csv" |
|
raw_data = io_services.load_raw_data(raw_data_path) |
|
# log_services.print_list(raw_data) |
|
time_tallies = data_services.tally_readings_per_second(raw_data) |
|
# log_services.print_dictionary(time_tallies) |
|
rps_totals = data_services.total_count_for_each_reading_per_second(time_tallies) |
|
# log_services.print_dictionary(rps_totals) |
|
# io_services.save_rps_totals(rps_totals, rps_save_path) |
|
rps_above_two = data_services.get_rps_above(2, time_tallies) |
|
# log_services.print_list(rps_above_two) |
|
io_services.save_rps_above_threshold(rps_above_two, rps_above_thresh) |
|
# flicker_tallies = data_services.tally_flickers(rsp_above_two, raw_data) |
|
# log_services.print_dictionary(flicker_tallies) |
|
|
|
if __name__ == "__main__": |
|
main()
|
|
|