| 1596 | } |
| 1597 | |
| 1598 | void BenchmarkContext::Node::dumpTree(int level) const |
| 1599 | { |
| 1600 | std::string data_string |
| 1601 | = data.has_value() ? fmt::format("{}", data->description()) : "no data"; |
| 1602 | |
| 1603 | std::string repeat_count_string = repeat_count != 0 ? fmt::format(", repeated {} times", repeat_count) : ""; |
| 1604 | |
| 1605 | std::string tag_string = tag.has_value() ? fmt::format(", tag: \"{}\"", *tag) : ""; |
| 1606 | |
| 1607 | std::cerr << fmt::format("{}name: {}, data: {}{}{}", std::string(level, '\t'), name.description(), data_string, repeat_count_string, tag_string) << std::endl; |
| 1608 | |
| 1609 | for (auto it = children.begin(); it != children.end();) |
| 1610 | { |
| 1611 | const auto & child = *it; |
| 1612 | child->dumpTree(level + 1); |
| 1613 | std::advance(it, child->repeat_count != 0 ? child->repeat_count : 1); |
| 1614 | } |
| 1615 | } |
| 1616 | |
| 1617 | std::shared_ptr<BenchmarkContext::Node> BenchmarkContext::Node::clone() const |
| 1618 | { |
no test coverage detected