MCPcopy Create free account
hub / github.com/AdaCompNUS/summit / write

Method write

PythonAPI/examples/gamma_crowd.py:648–661  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

646 self.log_file = log_file
647
648 def write(self):
649 self.log_file.write('{} {} {} {} {} {} {} {} {} {}\n'.format(
650 time.time() - self.start_time,
651 self.total_num_cars,
652 self.total_num_bikes,
653 self.total_num_pedestrians,
654 self.stuck_num_cars,
655 self.stuck_num_bikes,
656 self.stuck_num_pedestrians,
657 self.avg_speed_cars,
658 self.avg_speed_bikes,
659 self.avg_speed_pedestrians))
660 self.log_file.flush()
661 os.fsync(self.log_file)
662
663
664''' ========== MAIN LOGIC FUNCTIONS ========== '''

Callers 15

WriteMethod · 0.45
WriteMethod · 0.45
WriteValueFunction · 0.45
WriteFStringFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
do_collision_statisticsFunction · 0.45
serialize_recordsFunction · 0.45
write_vtype_xmlFunction · 0.45
mainFunction · 0.45
print_statusFunction · 0.45

Calls 1

flushMethod · 0.45

Tested by

no test coverage detected