Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions modules/core/perf/include/perf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ struct PerfResults {
class Perf {
public:
// Init performance analysis with initialized task and initialized data
explicit Perf(const std::shared_ptr<Task> &task);
explicit Perf(const std::shared_ptr<Task>& task);
// Set task with initialized task and initialized data for performance
// analysis c
void SetTask(const std::shared_ptr<Task> &task);
void SetTask(const std::shared_ptr<Task>& task);
// Check performance of full task's pipeline: pre_processing() ->
// validation() -> run() -> post_processing()
void PipelineRun(const std::shared_ptr<PerfAttr>& perf_attr,
const std::shared_ptr<ppc::core::PerfResults>& perf_results);
const std::shared_ptr<ppc::core::PerfResults>& perf_results);
// Check performance of task's run() function
void TaskRun(const std::shared_ptr<PerfAttr>& perf_attr, const std::shared_ptr<ppc::core::PerfResults>& perf_results);
// Pint results for automation checkers
Expand All @@ -43,7 +43,7 @@ class Perf {
private:
std::shared_ptr<Task> task;
static void CommonRun(const std::shared_ptr<PerfAttr>& perf_attr, const std::function<void()>& pipeline,
const std::shared_ptr<ppc::core::PerfResults>& perf_results);
const std::shared_ptr<ppc::core::PerfResults>& perf_results);
};

} // namespace core
Expand Down
10 changes: 5 additions & 5 deletions modules/core/perf/src/perf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
#include <sstream>
#include <utility>

ppc::core::Perf::Perf(const std::shared_ptr<Task> &task) { SetTask(task); }
ppc::core::Perf::Perf(const std::shared_ptr<Task>& task) { SetTask(task); }

void ppc::core::Perf::SetTask(const std::shared_ptr<Task> &task) {
void ppc::core::Perf::SetTask(const std::shared_ptr<Task>& task) {
task->get_data()->state_of_testing = TaskData::StateOfTesting::PERF;
this->task = task;
}

void ppc::core::Perf::PipelineRun(const std::shared_ptr<PerfAttr>& perf_attr,
const std::shared_ptr<ppc::core::PerfResults>& perf_results) {
const std::shared_ptr<ppc::core::PerfResults>& perf_results) {
perf_results->type_of_running = PerfResults::TypeOfRunning::PIPELINE;

CommonRun(
Expand All @@ -30,7 +30,7 @@ void ppc::core::Perf::PipelineRun(const std::shared_ptr<PerfAttr>& perf_attr,
}

void ppc::core::Perf::TaskRun(const std::shared_ptr<PerfAttr>& perf_attr,
const std::shared_ptr<ppc::core::PerfResults>& perf_results) {
const std::shared_ptr<ppc::core::PerfResults>& perf_results) {
perf_results->type_of_running = PerfResults::TypeOfRunning::TASK_RUN;

task->validation();
Expand All @@ -45,7 +45,7 @@ void ppc::core::Perf::TaskRun(const std::shared_ptr<PerfAttr>& perf_attr,
}

void ppc::core::Perf::CommonRun(const std::shared_ptr<PerfAttr>& perf_attr, const std::function<void()>& pipeline,
const std::shared_ptr<ppc::core::PerfResults>& perf_results) {
const std::shared_ptr<ppc::core::PerfResults>& perf_results) {
auto begin = perf_attr->current_timer();
for (uint64_t i = 0; i < perf_attr->num_running; i++) {
pipeline();
Expand Down
5 changes: 3 additions & 2 deletions modules/core/task/src/task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ bool ppc::core::Task::post_processing() {
}

void ppc::core::Task::internal_order_test(const std::string& str) {
if (!functions_order.empty() && str == functions_order.back() && str == "run") { return;
}
if (!functions_order.empty() && str == functions_order.back() && str == "run") {
return;
}

functions_order.push_back(str);

Expand Down
Loading