diff options
| -rw-r--r-- | algorithms.py | 4 | ||||
| -rw-r--r-- | store.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/algorithms.py b/algorithms.py index d0988ee..78aac94 100644 --- a/algorithms.py +++ b/algorithms.py @@ -31,7 +31,7 @@ def get_closest_node_id(nodes, source_node): min_node = node_id min_value = length - print(f"Found the closest node in {time.monotonic() - start} s") + print(f"Found the closest node in {time.monotonic() - start:.3} s") return min_node @@ -51,7 +51,7 @@ def find_shortest_path(nodes, source_id, target_id): walk_end = walk[-1] if walk_end == target_id: # you have reached your destination - print(f"Found a path in {time.monotonic() - start} s") + print(f"Found a path in {time.monotonic() - start:.3} s") return walk if walk_end in visited: # there exists a shorter walk to walk_end @@ -51,7 +51,7 @@ def extract_osm_nodes(f_name): if not node.neighbours: del nodes[node_id] - print(f"Extracted {len(nodes)} nodes in {time.monotonic() - start} s") + print(f"Extracted {len(nodes)} nodes in {time.monotonic() - start:.3} s") return nodes |
