Skip to content

Commit 47f37cd

Browse files
pre-commit-ci[bot]olivier-stasse
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent c1b53cb commit 47f37cd

File tree

3 files changed

+33
-32
lines changed

3 files changed

+33
-32
lines changed

include/dynamic-graph/process-list.hh

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -105,21 +105,21 @@ class DYNAMIC_GRAPH_DLLAPI CPUData {
105105

106106
template <class Archive>
107107
void serialize(Archive &ar, const unsigned int version) {
108-
ar &version;
109-
ar &total_time_;
110-
ar &user_mode_time_;
111-
ar &nice_time_;
112-
ar &system_time_;
113-
ar &system_all_time_;
114-
ar &idle_time_;
115-
ar &idle_all_time_;
116-
ar &iowait_time_;
117-
ar &irq_time_;
118-
ar &softirq_time_;
119-
ar &steal_time_;
120-
ar &guest_time_;
121-
ar &guest_nice_time_;
122-
ar &percent_;
108+
ar & version;
109+
ar & total_time_;
110+
ar & user_mode_time_;
111+
ar & nice_time_;
112+
ar & system_time_;
113+
ar & system_all_time_;
114+
ar & idle_time_;
115+
ar & idle_all_time_;
116+
ar & iowait_time_;
117+
ar & irq_time_;
118+
ar & softirq_time_;
119+
ar & steal_time_;
120+
ar & guest_time_;
121+
ar & guest_nice_time_;
122+
ar & percent_;
123123
}
124124
};
125125

@@ -154,10 +154,10 @@ class DYNAMIC_GRAPH_DLLAPI System {
154154

155155
template <class Archive>
156156
void serialize(Archive &ar, const unsigned int version) {
157-
ar &version;
158-
ar &cpuNb_;
159-
ar &gCPUData_;
160-
ar &vCPUData_;
157+
ar & version;
158+
ar & cpuNb_;
159+
ar & gCPUData_;
160+
ar & vCPUData_;
161161
}
162162
};
163163
} // namespace CPU

src/mt/process-list.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ void CPUData::ProcessLine(std::istringstream &aCPULine) {
8181
total_time_ = ltotal_time;
8282

8383
if (total_period_ != 0) {
84-
percent_ = (double)(user_mode_period_) / (double)(total_period_)*100.0;
85-
percent_ += (double)(nice_period_) / (double)(total_period_)*100.0;
86-
percent_ += (double)(system_period_) / (double)(total_period_)*100.0;
87-
percent_ += (double)(irq_period_) / (double)(total_period_)*100.0;
88-
percent_ += (double)(softirq_period_) / (double)(total_period_)*100.0;
89-
percent_ += (double)(steal_period_) / (double)(total_period_)*100.0;
90-
percent_ += (double)(iowait_period_) / (double)(total_period_)*100.0;
84+
percent_ = (double)(user_mode_period_) / (double)(total_period_) * 100.0;
85+
percent_ += (double)(nice_period_) / (double)(total_period_) * 100.0;
86+
percent_ += (double)(system_period_) / (double)(total_period_) * 100.0;
87+
percent_ += (double)(irq_period_) / (double)(total_period_) * 100.0;
88+
percent_ += (double)(softirq_period_) / (double)(total_period_) * 100.0;
89+
percent_ += (double)(steal_period_) / (double)(total_period_) * 100.0;
90+
percent_ += (double)(iowait_period_) / (double)(total_period_) * 100.0;
9191
}
9292
}
9393

tests/value.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -409,12 +409,13 @@ BOOST_AUTO_TEST_CASE(value_values) {
409409
BOOST_CHECK(vs == values);
410410
}
411411
{
412-
// Cast does not work.
413-
// dg::command::EitherType eitherType (vvalues);
414-
// Values vs = static_cast<Values>(eitherType);
415-
// BOOST_CHECK_EQUAL(vs.size(), values.size());
416-
// BOOST_CHECK(vs == values);
417-
} { // Constructor
412+
// Cast does not work.
413+
// dg::command::EitherType eitherType (vvalues);
414+
// Values vs = static_cast<Values>(eitherType);
415+
// BOOST_CHECK_EQUAL(vs.size(), values.size());
416+
// BOOST_CHECK(vs == values);
417+
}
418+
{ // Constructor
418419
Value vvs(vvalues);
419420
BOOST_CHECK(vvs == vvalues);
420421
}

0 commit comments

Comments
 (0)