| 40 | namespace bytedance::bolt::exec::trace { |
| 41 | namespace { |
| 42 | std::string findLastPathNode(const std::string& path) { |
| 43 | std::vector<std::string> pathNodes; |
| 44 | folly::split("/", path, pathNodes); |
| 45 | while (!pathNodes.empty() && pathNodes.back().empty()) { |
| 46 | pathNodes.pop_back(); |
| 47 | } |
| 48 | BOLT_CHECK(!pathNodes.empty(), "No valid path nodes found from {}", path); |
| 49 | return pathNodes.back(); |
| 50 | } |
| 51 | } // namespace |
| 52 | |
| 53 | void createTraceDirectory(const std::string& traceDir) { |
no test coverage detected