From e6077bb7b0a2d2888d5a25bf1e461a89c2693b7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Tue, 28 Oct 2014 14:25:52 +0100 Subject: [PATCH] add timer for shortest path queries --- .../Polyhedron/Scene_polyhedron_shortest_path_item.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Scene_polyhedron_shortest_path_item.cpp b/Polyhedron/demo/Polyhedron/Scene_polyhedron_shortest_path_item.cpp index 217574aae71..d6acadcb904 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polyhedron_shortest_path_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_polyhedron_shortest_path_item.cpp @@ -338,10 +338,11 @@ bool Scene_polyhedron_shortest_path_item::run_point_select(const Ray_3& ray) polylines->polylines.push_back(Scene_polylines_item::Polyline()); m_messages->information(tr("Computing shortest path polyline...")); - - m_shortestPaths->shortest_path_points_to_source_points(faceLocation.first, faceLocation.second, std::back_inserter(polylines->polylines.back())); - m_messages->information(tr("Done")); + QTime time; + time.start(); + m_shortestPaths->shortest_path_points_to_source_points(faceLocation.first, faceLocation.second, std::back_inserter(polylines->polylines.back())); + std::cout << "ok (" << time.elapsed() << " ms)" << std::endl; polylines->setName(tr("%1 (shortest path)").arg(polyhedron_item()->name())); polylines->setColor(Qt::red);