diff --git a/src/library/include/io/results/match/match_output_printer.hpp b/src/library/include/io/results/match/match_output_printer.hpp index 47308b8..0f4fcee 100644 --- a/src/library/include/io/results/match/match_output_printer.hpp +++ b/src/library/include/io/results/match/match_output_printer.hpp @@ -70,7 +70,7 @@ namespace map_matching_2::io::results { } protected: - std::size_t _track_points{}, _prepared_points{}, _candidates{}, _combinations{}; + std::size_t _aborted{}, _track_points{}, _prepared_points{}, _candidates{}, _combinations{}; [[nodiscard]] std::string parse_task(task_type &&task) { if (this->is_active()) { @@ -83,6 +83,10 @@ namespace map_matching_2::io::results { _candidates += task.edges; _combinations += task.combinations; + if (task.aborted) { + ++_aborted; + } + return std::format( "Match {} with id '{}' {} {:.3f} s, " "track points: {}, prepared points: {}, candidates: {}, combinations: {}", @@ -96,11 +100,12 @@ namespace map_matching_2::io::results { [[nodiscard]] std::string parse_aggregated_result() { if (this->is_active()) { if (this->_counter > 0) { + _aborted = _aborted > this->_counter ? this->_counter : _aborted; return std::format( - "Matches count: {}, total duration: {:.3f} s, " + "Matches count: {}, finished: {}, aborted: {}, total duration: {:.3f} s, " "tracks points: {}, prepared points: {}, candidates: {}, combinations: {}", - this->_counter, this->_duration, _track_points, _prepared_points, - _candidates, _combinations); + this->_counter, this->_counter - _aborted, _aborted, this->_duration, + _track_points, _prepared_points, _candidates, _combinations); } } return "";