Skip to content

Commit

Permalink
ci(pre-commit): autofix
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Apr 29, 2023
1 parent 7a2ed1d commit eb4427f
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 16 deletions.
10 changes: 8 additions & 2 deletions CARET_trace/src/clock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@

#include <caret_trace/clock.hpp>

Clock::Clock() { lttng_ust_trace_clock_get_read64_cb(&lttng_clock_); }
Clock::Clock()
{
lttng_ust_trace_clock_get_read64_cb(&lttng_clock_);
}

int64_t Clock::now() { return lttng_clock_(); }
int64_t Clock::now()
{
return lttng_clock_();
}
25 changes: 20 additions & 5 deletions CARET_trace/src/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,20 @@ TracingController & Context::get_controller()
return *controller_;
}

std::shared_ptr<DataContainer> Context::get_data_container_ptr() { return data_container_; }
std::shared_ptr<DataContainer> Context::get_data_container_ptr()
{
return data_container_;
}

std::shared_ptr<LttngSession> Context::get_lttng_session_ptr() { return lttng_; }
std::shared_ptr<LttngSession> Context::get_lttng_session_ptr()
{
return lttng_;
}

DataContainer & Context::get_data_container() { return *data_container_; }
DataContainer & Context::get_data_container()
{
return *data_container_;
}

TraceNodeInterface & Context::get_node()
{
Expand All @@ -75,6 +84,12 @@ bool Context::is_recording_allowed() const
return false;
}

void Context::assign_node(std::shared_ptr<TraceNodeInterface> node) { node_ = node; }
void Context::assign_node(std::shared_ptr<TraceNodeInterface> node)
{
node_ = node;
}

bool Context::is_node_assigned() const { return static_cast<bool>(node_); }
bool Context::is_node_assigned() const
{
return static_cast<bool>(node_);
}
10 changes: 8 additions & 2 deletions CARET_trace/src/data_container.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,15 @@ void DataContainer::start_recording()
}
}

void DataContainer::reset() { recorder_->reset(); }
void DataContainer::reset()
{
recorder_->reset();
}

std::vector<std::string> DataContainer::trace_points() const { return recorder_->trace_points(); }
std::vector<std::string> DataContainer::trace_points() const
{
return recorder_->trace_points();
}

void DataContainer::assign_add_callback_group(AddCallbackGroup::StdFuncT record)
{
Expand Down
4 changes: 3 additions & 1 deletion CARET_trace/src/data_recorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
#include <utility>
#include <vector>

DataRecorder::DataRecorder() {}
DataRecorder::DataRecorder()
{
}

DataRecorder::DataRecorder(std::initializer_list<std::shared_ptr<RecordableDataInterface>> data)
: DataRecorder(std::vector<std::shared_ptr<RecordableDataInterface>>(data))
Expand Down
5 changes: 4 additions & 1 deletion CARET_trace/src/lttng_session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,7 @@ bool LttngSessionImpl::is_session_running() const
return is_session_running;
}

bool LttngSessionImpl::started_session_running() const { return started_session_running_; }
bool LttngSessionImpl::started_session_running() const
{
return started_session_running_;
}
19 changes: 15 additions & 4 deletions CARET_trace/src/trace_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ TraceNode::TraceNode(
debug("Initialized.");
}

TraceNode::~TraceNode() {}
TraceNode::~TraceNode()
{
}

std::string TraceNode::get_unique_node_name(std::string base_name)
{
Expand All @@ -108,7 +110,10 @@ void TraceNode::info(std::string message) const
}
}

DataContainerInterface & TraceNode::get_data_container() { return *data_container_; }
DataContainerInterface & TraceNode::get_data_container()
{
return *data_container_;
}

void TraceNode::run_timer()
{
Expand Down Expand Up @@ -153,7 +158,10 @@ bool TraceNode::is_recording_allowed_init() const
return status_ == TRACE_STATUS::RECORD || status_ == TRACE_STATUS::PREPARE;
}

const TRACE_STATUS & TraceNode::get_status() const { return status_; }
const TRACE_STATUS & TraceNode::get_status() const
{
return status_;
}

void TraceNode::publish_status(TRACE_STATUS status) const
{
Expand Down Expand Up @@ -195,7 +203,10 @@ void TraceNode::start_callback(caret_msgs::msg::Start::UniquePtr msg)
run_timer();
}

bool TraceNode::is_timer_running() const { return !timer_->is_canceled(); }
bool TraceNode::is_timer_running() const
{
return !timer_->is_canceled();
}

void TraceNode::timer_callback()
{
Expand Down
5 changes: 4 additions & 1 deletion CARET_trace/test/test_scenario.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ void add_data(DataContainer & container, int loop)
}
}

void record_data(DataContainer & container, int loop) { container.record(loop); }
void record_data(DataContainer & container, int loop)
{
container.record(loop);
}

TEST(ScenarioTest, TestSingleThread)
{
Expand Down

0 comments on commit eb4427f

Please sign in to comment.