MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / format

Method format

performance-tests/bench/report_parser/StatBlockRawFormatter.cpp:7–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5namespace Bench {
6
7int StatBlockRawFormatter::format(const Bench::TestController::Report& report, std::ostream& output_stream, const ParseParameters& parse_parameters)
8{
9 SharedSummaryReportVisitor visitor;
10
11 if (!parse_parameters.tags.empty()) {
12 visitor.tags_ = parse_parameters.tags;
13 }
14
15 if (!parse_parameters.stats.empty()) {
16 visitor.stats_ = parse_parameters.stats;
17 }
18
19 visit_report(report, visitor);
20
21 const auto& tags = visitor.tags_;
22 const auto& stats = visitor.stats_;
23 const auto& untagged_stat_vecs = visitor.untagged_stat_vecs_;
24 const auto& tagged_stat_vecs = visitor.tagged_stat_vecs_;
25
26 for (auto stat_it = stats.begin(); stat_it != stats.end(); ++stat_it) {
27 auto stat_pos = untagged_stat_vecs.find(*stat_it);
28 if (stat_pos != untagged_stat_vecs.end()) {
29 output_stream << std::endl;
30 consolidate(stat_pos->second).pretty_print(output_stream, *stat_it);
31 }
32 }
33 for (auto tags_it = tags.begin(); tags_it != tags.end(); ++tags_it) {
34 auto tag_pos = tagged_stat_vecs.find(*tags_it);
35 if (tag_pos != tagged_stat_vecs.end()) {
36 output_stream << std::endl;
37 output_stream << "---=== Stats For Tag '" << *tags_it << "' ===---" << std::endl;
38
39 for (auto stat_it = stats.begin(); stat_it != stats.end(); ++stat_it) {
40 auto stat_pos = tag_pos->second.find(*stat_it);
41 if (stat_pos != tag_pos->second.end()) {
42 output_stream << std::endl;
43 consolidate(stat_pos->second).pretty_print(output_stream, *stat_it);
44 }
45 }
46
47 }
48 }
49 return EXIT_SUCCESS;
50}
51
52} // namespace Bench

Callers

nothing calls this directly

Calls 7

visit_reportFunction · 0.85
consolidateFunction · 0.85
pretty_printMethod · 0.80
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected