Skip to content

Commit

Permalink
style(pre-commit): autofix
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Nov 12, 2024
1 parent 89297b2 commit 6d25e49
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 12 deletions.
3 changes: 2 additions & 1 deletion system/system_monitor/src/cpu_monitor/cpu_monitor_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ CPUMonitorBase::CPUMonitorBase(const std::string & node_name, const rclcpp::Node
updater_.add(std::string(hostname_) + ": CPU Temperature", this, &CPUMonitorBase::checkTemp);
updater_.add(std::string(hostname_) + ": CPU Usage", this, &CPUMonitorBase::checkUsage);
updater_.add(std::string(hostname_) + ": CPU Load Average", this, &CPUMonitorBase::checkLoad);
updater_.add(std::string(hostname_) + ": CPU Thermal Throttling", this, &CPUMonitorBase::checkThrottling);
updater_.add(
std::string(hostname_) + ": CPU Thermal Throttling", this, &CPUMonitorBase::checkThrottling);
updater_.add(std::string(hostname_) + ": CPU Frequency", this, &CPUMonitorBase::checkFrequency);

// Publisher
Expand Down
6 changes: 4 additions & 2 deletions system/system_monitor/src/gpu_monitor/gpu_monitor_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ GPUMonitorBase::GPUMonitorBase(const std::string & node_name, const rclcpp::Node
updater_.setHardwareID(hostname_);
updater_.add(std::string(hostname_) + ": GPU Temperature", this, &GPUMonitorBase::checkTemp);
updater_.add(std::string(hostname_) + ": GPU Usage", this, &GPUMonitorBase::checkUsage);
updater_.add(std::string(hostname_) + ": GPU Memory Usage", this, &GPUMonitorBase::checkMemoryUsage);
updater_.add(std::string(hostname_) + ": GPU Thermal Throttling", this, &GPUMonitorBase::checkThrottling);
updater_.add(
std::string(hostname_) + ": GPU Memory Usage", this, &GPUMonitorBase::checkMemoryUsage);
updater_.add(
std::string(hostname_) + ": GPU Thermal Throttling", this, &GPUMonitorBase::checkThrottling);
updater_.add(std::string(hostname_) + ": GPU Frequency", this, &GPUMonitorBase::checkFrequency);
}

Expand Down
16 changes: 11 additions & 5 deletions system/system_monitor/src/hdd_monitor/hdd_monitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,19 @@ HddMonitor::HddMonitor(const rclcpp::NodeOptions & options)
getHddParams();

updater_.setHardwareID(hostname_);
updater_.add(std::string(hostname_) + ": HDD Temperature", this, &HddMonitor::checkSmartTemperature);
updater_.add(std::string(hostname_) + ": HDD PowerOnHours", this, &HddMonitor::checkSmartPowerOnHours);
updater_.add(std::string(hostname_) + ": HDD TotalDataWritten", this, &HddMonitor::checkSmartTotalDataWritten);
updater_.add(std::string(hostname_) + ": HDD RecoveredError", this, &HddMonitor::checkSmartRecoveredError);
updater_.add(
std::string(hostname_) + ": HDD Temperature", this, &HddMonitor::checkSmartTemperature);
updater_.add(
std::string(hostname_) + ": HDD PowerOnHours", this, &HddMonitor::checkSmartPowerOnHours);
updater_.add(
std::string(hostname_) + ": HDD TotalDataWritten", this,
&HddMonitor::checkSmartTotalDataWritten);
updater_.add(
std::string(hostname_) + ": HDD RecoveredError", this, &HddMonitor::checkSmartRecoveredError);
updater_.add(std::string(hostname_) + ": HDD Usage", this, &HddMonitor::checkUsage);
updater_.add(std::string(hostname_) + ": HDD ReadDataRate", this, &HddMonitor::checkReadDataRate);
updater_.add(std::string(hostname_) + ": HDD WriteDataRate", this, &HddMonitor::checkWriteDataRate);
updater_.add(
std::string(hostname_) + ": HDD WriteDataRate", this, &HddMonitor::checkWriteDataRate);
updater_.add(std::string(hostname_) + ": HDD ReadIOPS", this, &HddMonitor::checkReadIops);
updater_.add(std::string(hostname_) + ": HDD WriteIOPS", this, &HddMonitor::checkWriteIops);
updater_.add(std::string(hostname_) + ": HDD Connection", this, &HddMonitor::checkConnection);
Expand Down
7 changes: 5 additions & 2 deletions system/system_monitor/src/net_monitor/net_monitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,14 @@ NetMonitor::NetMonitor(const rclcpp::NodeOptions & options)

gethostname(hostname_, sizeof(hostname_));
updater_.setHardwareID(hostname_);
updater_.add(std::string(hostname_) + ": Network Connection", this, &NetMonitor::check_connection);
updater_.add(
std::string(hostname_) + ": Network Connection", this, &NetMonitor::check_connection);
updater_.add(std::string(hostname_) + ": Network Usage", this, &NetMonitor::check_usage);
updater_.add(std::string(hostname_) + ": Network Traffic", this, &NetMonitor::monitor_traffic);
updater_.add(std::string(hostname_) + ": Network CRC Error", this, &NetMonitor::check_crc_error);
updater_.add(std::string(hostname_) + ": IP Packet Reassembles Failed", this, &NetMonitor::check_reassembles_failed);
updater_.add(
std::string(hostname_) + ": IP Packet Reassembles Failed", this,
&NetMonitor::check_reassembles_failed);

nl80211_.init();

Expand Down
6 changes: 4 additions & 2 deletions system/system_monitor/src/process_monitor/process_monitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,14 @@ ProcessMonitor::ProcessMonitor(const rclcpp::NodeOptions & options)
updater_.add(std::string(hostname_) + ": Tasks Summary", this, &ProcessMonitor::monitorProcesses);

for (index = 0; index < num_of_procs_; ++index) {
auto task = std::make_shared<DiagTask>(fmt::format(std::string(hostname_) + ": High-load Proc[{}]", index));
auto task = std::make_shared<DiagTask>(
fmt::format(std::string(hostname_) + ": High-load Proc[{}]", index));
load_tasks_.push_back(task);
updater_.add(*task);
}
for (index = 0; index < num_of_procs_; ++index) {
auto task = std::make_shared<DiagTask>(fmt::format(std::string(hostname_) + ": High-mem Proc[{}]", index));
auto task = std::make_shared<DiagTask>(
fmt::format(std::string(hostname_) + ": High-mem Proc[{}]", index));
memory_tasks_.push_back(task);
updater_.add(*task);
}
Expand Down

0 comments on commit 6d25e49

Please sign in to comment.