MCPcopy Create free account
hub / github.com/comaps/comaps / main

Function main

tools/python/maps_generator/update_generation_order.py:29–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27
28
29def main():
30 args = get_args()
31 with ThreadPool() as pool:
32 order = pool.map(
33 process_log,
34 (log for log in logs_reader.LogsReader(args.logs) if log.is_mwm_log),
35 )
36
37 order.sort(key=lambda v: v[1], reverse=True)
38 with open(args.output, "w") as out:
39 out.write("# Mwm name\tGeneration time\n")
40 out.writelines("{}\t{}\n".format(*line) for line in order)
41
42
43if __name__ == "__main__":

Callers 1

Calls 6

ThreadPoolClass · 0.90
formatMethod · 0.80
get_argsFunction · 0.70
mapMethod · 0.45
sortMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected