01234567890123456789012345678901234567890123456789012345678901234567890123456789
71477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187 | <----SKIPPED LINES----> if dump_json_exists: tmp_timestamp = os.path.getmtime(DUMP_JSON_FILE) if (SIMULATION and DumpJsonChanges()) or ( not SIMULATION and dump_json_exists and tmp_timestamp > last_dump_json_timestamp): last_dump_json_timestamp = tmp_timestamp (persistent_nearby_aircraft, flight, now, json_desc_dict, persistent_path) = ScanForNewFlights( persistent_nearby_aircraft, persistent_path, configuration.get('log_jsons', False), flights) # DEBUG: As part of the memory instrumentation, let's track # the size of these data structures iteration_divisor = configuration.get('memory', 0) if iteration_divisor and not iteration % iteration_divisor: lengths = [ len(persistent_nearby_aircraft), len(flight), len(json_desc_dict), len(flights)] Log('Iteration: %d: object lengths: %s' % (iteration, lengths)) # because this might just be an updated instance of the previous # flight as more identifier information (squawk and or flight number) # comes in, we only want to process this if its a truly new flight new_flight_flag = ConfirmNewFlight(flight, flights) if new_flight_flag: flights.append(flight) remote, servo = RefreshArduinos( remote, servo, to_remote_q, to_servo_q, to_main_q, shutdown, flights, json_desc_dict, configuration, screen_history) if FlightMeetsDisplayCriteria(flight, configuration, log=True): <----SKIPPED LINES----> |
01234567890123456789012345678901234567890123456789012345678901234567890123456789
71477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187 | <----SKIPPED LINES----> if dump_json_exists: tmp_timestamp = os.path.getmtime(DUMP_JSON_FILE) if (SIMULATION and DumpJsonChanges()) or ( not SIMULATION and dump_json_exists and tmp_timestamp > last_dump_json_timestamp): last_dump_json_timestamp = tmp_timestamp (persistent_nearby_aircraft, flight, now, json_desc_dict, persistent_path) = ScanForNewFlights( persistent_nearby_aircraft, persistent_path, configuration.get('log_jsons', False), flights) # DEBUG: As part of the memory instrumentation, let's track # the size of these data structures iteration_divisor = configuration.get('memory', 0) if iteration_divisor and not iteration % (iteration_divisor * 1000): lengths = [ len(persistent_nearby_aircraft), len(flight), len(json_desc_dict), len(flights)] Log('Iteration: %d: object lengths: %s' % (iteration, lengths)) # because this might just be an updated instance of the previous # flight as more identifier information (squawk and or flight number) # comes in, we only want to process this if its a truly new flight new_flight_flag = ConfirmNewFlight(flight, flights) if new_flight_flag: flights.append(flight) remote, servo = RefreshArduinos( remote, servo, to_remote_q, to_servo_q, to_main_q, shutdown, flights, json_desc_dict, configuration, screen_history) if FlightMeetsDisplayCriteria(flight, configuration, log=True): <----SKIPPED LINES----> |