diff options
author | Anthony Barbier <anthony.barbier@arm.com> | 2018-04-20 15:46:21 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:49:54 +0000 |
commit | 9fb0cac961f70d1937c5fa3eafeaee1385c89768 (patch) | |
tree | 9a8847053f65631e050c231645549adb48c92fb8 /tests/framework/Profiler.cpp | |
parent | fda901f0485371e8b6a807c8dd9614560a924793 (diff) | |
download | ComputeLibrary-9fb0cac961f70d1937c5fa3eafeaee1385c89768.tar.gz |
COMPMID-1081: Introduced test-wide instruments
Change-Id: I5831241f3fc503717cc51136453c2bf96d4b420b
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/128484
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'tests/framework/Profiler.cpp')
-rw-r--r-- | tests/framework/Profiler.cpp | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/tests/framework/Profiler.cpp b/tests/framework/Profiler.cpp index 646c66556c..69ea527a80 100644 --- a/tests/framework/Profiler.cpp +++ b/tests/framework/Profiler.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -37,6 +37,14 @@ void Profiler::add(std::unique_ptr<Instrument> instrument) _instruments.emplace_back(std::move(instrument)); } +void Profiler::test_start() +{ + for(auto &instrument : _instruments) + { + instrument->test_start(); + } +} + void Profiler::start() { for(auto &instrument : _instruments) @@ -51,7 +59,6 @@ void Profiler::stop() { instrument->stop(); } - for(const auto &instrument : _instruments) { for(const auto &measurement : instrument->measurements()) @@ -61,6 +68,22 @@ void Profiler::stop() } } +void Profiler::test_stop() +{ + for(auto &instrument : _instruments) + { + instrument->test_stop(); + } + + for(const auto &instrument : _instruments) + { + for(const auto &measurement : instrument->test_measurements()) + { + _measurements[instrument->id() + "/" + measurement.first].push_back(measurement.second); + } + } +} + const Profiler::MeasurementsMap &Profiler::measurements() const { return _measurements; |