This repository was archived by the owner on Jan 30, 2020. It is now read-only.
Commit 46c9557
Dongsu Park
systemd: avoid iteration into unit list using UnitState
To avoid an additional iteration of unit states for each unit, set
UnitState.ActiveEnterTimestamp accordingly, by calling
m.systemd.GetUnitProperty(). Note that we need to retrieve the property
not only in the normal loop for the current systemd (>=230), but also
in the fallback handling for the older version of systemd (<=229).1 parent 664c8d1 commit 46c9557
1 file changed
Lines changed: 18 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
178 | | - | |
179 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
180 | 181 | | |
181 | 182 | | |
182 | 183 | | |
| |||
238 | 239 | | |
239 | 240 | | |
240 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
241 | 245 | | |
242 | 246 | | |
243 | 247 | | |
| |||
256 | 260 | | |
257 | 261 | | |
258 | 262 | | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | 263 | | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
| 264 | + | |
269 | 265 | | |
270 | | - | |
271 | | - | |
| 266 | + | |
| 267 | + | |
272 | 268 | | |
273 | 269 | | |
274 | 270 | | |
| |||
328 | 324 | | |
329 | 325 | | |
330 | 326 | | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
331 | 335 | | |
332 | 336 | | |
333 | 337 | | |
| |||
0 commit comments