| 48 | {} |
| 49 | |
| 50 | void TreeObserver::callback(Duration timestamp, const TreeNode& node, |
| 51 | NodeStatus /*prev_status*/, NodeStatus status) |
| 52 | { |
| 53 | auto& statistics = _statistics[node.UID()]; |
| 54 | statistics.current_status = status; |
| 55 | statistics.last_timestamp = timestamp; |
| 56 | |
| 57 | if(status == NodeStatus::IDLE) |
| 58 | { |
| 59 | return; |
| 60 | } |
| 61 | |
| 62 | statistics.transitions_count++; |
| 63 | |
| 64 | if(status == NodeStatus::SUCCESS) |
| 65 | { |
| 66 | statistics.last_result = status; |
| 67 | statistics.success_count++; |
| 68 | } |
| 69 | else if(status == NodeStatus::FAILURE) |
| 70 | { |
| 71 | statistics.last_result = status; |
| 72 | statistics.failure_count++; |
| 73 | } |
| 74 | else if(status == NodeStatus::SKIPPED) |
| 75 | { |
| 76 | statistics.skip_count++; |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | const TreeObserver::NodeStatistics& |
| 81 | TreeObserver::getStatistics(const std::string& path) const |
no test coverage detected