| 44 | } // namespace |
| 45 | |
| 46 | void MinitraceLogger::callback(Duration /*timestamp*/, const TreeNode& node, |
| 47 | NodeStatus prev_status, NodeStatus status) |
| 48 | { |
| 49 | const bool statusCompleted = isStatusCompleted(status); |
| 50 | |
| 51 | const char* category = toConstStr(node.type()); |
| 52 | const char* name = node.name().c_str(); |
| 53 | |
| 54 | if(prev_status == NodeStatus::IDLE && statusCompleted) |
| 55 | { |
| 56 | MTR_INSTANT(category, name); |
| 57 | } |
| 58 | else if(status == NodeStatus::RUNNING) |
| 59 | { |
| 60 | MTR_BEGIN(category, name); |
| 61 | } |
| 62 | else if(prev_status == NodeStatus::RUNNING && statusCompleted) |
| 63 | { |
| 64 | MTR_END(category, name); |
| 65 | } |
| 66 | mtr_flush(); |
| 67 | } |
| 68 | |
| 69 | void MinitraceLogger::flush() |
| 70 | { |
nothing calls this directly
no test coverage detected