# compute the path length and run time to a path generated by navFn

Hi

I want to compute the path length generated by navFn(in meters), and the how long does it take from navFn to generate the path ( in ms).

I referred to: http://wiki.ros.org/navfn , I found that, the published topic nav_msgs/Path gives , "last plan computed by navfn, published everytime the planner computes a new path", but **do navFn computes many paths? I do not understand why navFn calculates many paths since it is a global planner!**

**I want only the final path from start to goal, so is this published topic useful for this purpose?**

I also referred to: https://answers.ros.org/question/4543...

https://answers.ros.org/question/2905...

https://docs.ros.org/en/api/navfn/htm...

In the last link, I found these two functions: calcPath() ==> The length of the path found calculates path for at most <n> cycles, returns path length, 0 if none

**Does this function gives length in meter? Is is the last computed path?**

getPathLen() ==> The length of a path length of path, 0 if not found

**Does this function gives length in meter? Is is the last computed path? and what is the difference between getPathLen and calcPath?**

I could not find a function to compute the time required to generate the global path, so I need to implement this myself,

so, here: https://docs.ros.org/en/api/navfn/htm...

**I think a need to modify navFn code and set a timer before and after makePlan(), but which version of makePlan() do you think is better? and is this idea applicable?**

I am looking forward to your advice, thank you.