add: path statistics functions.
fix: forgot to add c file.