diff options
author | Freddie Liardet <frederick.liardet@arm.com> | 2021-06-17 13:30:11 +0100 |
---|---|---|
committer | frederick.liardet <frederick.liardet@arm.com> | 2021-07-19 14:11:47 +0000 |
commit | 59fd7a722e5bc7e85309d6200bc37a772721a719 (patch) | |
tree | a02958337f472ff4ceaed46c454eaca6f137efe2 /tests/framework/printers | |
parent | 67354e0862a1dd171d41cc45aeb8a470d37708d7 (diff) | |
download | ComputeLibrary-59fd7a722e5bc7e85309d6200bc37a772721a719.tar.gz |
Add layer data to JSON output
Add layer data information to SchedulerTimer JSON output.
Resolves: COMPMID-4423
Change-Id: Ife78dee8afc0910cf47b135bc6809cc170ec4ed3
Signed-off-by: Freddie Liardet <frederick.liardet@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5923
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Comments-Addressed: Georgios Pinitas <georgios.pinitas@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/framework/printers')
-rw-r--r-- | tests/framework/printers/JSONPrinter.cpp | 9 | ||||
-rw-r--r-- | tests/framework/printers/JSONPrinter.h | 3 | ||||
-rw-r--r-- | tests/framework/printers/PrettyPrinter.cpp | 8 | ||||
-rw-r--r-- | tests/framework/printers/PrettyPrinter.h | 3 | ||||
-rw-r--r-- | tests/framework/printers/Printer.h | 8 |
5 files changed, 25 insertions, 6 deletions
diff --git a/tests/framework/printers/JSONPrinter.cpp b/tests/framework/printers/JSONPrinter.cpp index 0995ff3594..cf1a4c38cb 100644 --- a/tests/framework/printers/JSONPrinter.cpp +++ b/tests/framework/printers/JSONPrinter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 Arm Limited. + * Copyright (c) 2017-2019,2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -169,10 +169,15 @@ void JSONPrinter::print_info(const std::string &info) _infos.push_back(info); } -void JSONPrinter::print_measurements(const Profiler::MeasurementsMap &measurements) +void JSONPrinter::print_profiler_header(const std::string &header_data) { print_separator(_first_test_entry); + *_stream << header_data; +} +void JSONPrinter::print_measurements(const Profiler::MeasurementsMap &measurements) +{ + print_separator(_first_test_entry); *_stream << R"("measurements" : {)"; for(auto i_it = measurements.cbegin(), i_end = measurements.cend(); i_it != i_end;) diff --git a/tests/framework/printers/JSONPrinter.h b/tests/framework/printers/JSONPrinter.h index ce587ade04..ad996708e7 100644 --- a/tests/framework/printers/JSONPrinter.h +++ b/tests/framework/printers/JSONPrinter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Arm Limited. + * Copyright (c) 2017,2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -51,6 +51,7 @@ public: void print_errors_footer() override; void print_error(const std::exception &error, bool expected) override; void print_info(const std::string &info) override; + void print_profiler_header(const std::string &header_data) override; void print_measurements(const Profiler::MeasurementsMap &measurements) override; void print_list_tests(const std::vector<TestInfo> &infos) override; diff --git a/tests/framework/printers/PrettyPrinter.cpp b/tests/framework/printers/PrettyPrinter.cpp index aa06eb9b4e..529ff2c2d9 100644 --- a/tests/framework/printers/PrettyPrinter.cpp +++ b/tests/framework/printers/PrettyPrinter.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 Arm Limited. + * Copyright (c) 2017-2019,2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -116,6 +116,12 @@ void PrettyPrinter::print_list_tests(const std::vector<TestInfo> &infos) *_stream << "[" << info.id << ", " << info.mode << ", " << info.status << "] " << info.name << "\n"; } } + +void PrettyPrinter::print_profiler_header(const std::string &header_data) +{ + ARM_COMPUTE_UNUSED(header_data); +} + void PrettyPrinter::print_measurements(const Profiler::MeasurementsMap &measurements) { for(const auto &instrument : measurements) diff --git a/tests/framework/printers/PrettyPrinter.h b/tests/framework/printers/PrettyPrinter.h index ded0da04d8..b9d5d3957c 100644 --- a/tests/framework/printers/PrettyPrinter.h +++ b/tests/framework/printers/PrettyPrinter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Arm Limited. + * Copyright (c) 2017,2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -55,6 +55,7 @@ public: void print_errors_footer() override; void print_error(const std::exception &error, bool expected) override; void print_info(const std::string &info) override; + void print_profiler_header(const std::string &header_data) override; void print_measurements(const Profiler::MeasurementsMap &measurements) override; void print_list_tests(const std::vector<TestInfo> &infos) override; diff --git a/tests/framework/printers/Printer.h b/tests/framework/printers/Printer.h index 669b7f6a95..af0209788c 100644 --- a/tests/framework/printers/Printer.h +++ b/tests/framework/printers/Printer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 Arm Limited. + * Copyright (c) 2017-2018,2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -125,6 +125,12 @@ public: */ virtual void print_info(const std::string &info) = 0; + /** Print header data. + * + * @param[in] header_data JSON formmated header data. + */ + virtual void print_profiler_header(const std::string &header_data) = 0; + /** Print measurements for a test. * * @param[in] measurements Measurements as collected by a @ref Profiler. |