@@ -190,17 +190,6 @@ fn read_total_cpu(reader: &procfs::ProcReader) -> Result<procfs::CpuStat> {
190190fn calc_util ( curr : & procfs:: CpuStat , prev : & procfs:: CpuStat ) -> Result < f64 > {
191191 match ( curr, prev) {
192192 (
193- procfs:: CpuStat {
194- user_usec : Some ( prev_user) ,
195- nice_usec : Some ( prev_nice) ,
196- system_usec : Some ( prev_system) ,
197- idle_usec : Some ( prev_idle) ,
198- iowait_usec : Some ( prev_iowait) ,
199- irq_usec : Some ( prev_irq) ,
200- softirq_usec : Some ( prev_softirq) ,
201- stolen_usec : Some ( prev_stolen) ,
202- ..
203- } ,
204193 procfs:: CpuStat {
205194 user_usec : Some ( curr_user) ,
206195 nice_usec : Some ( curr_nice) ,
@@ -212,6 +201,17 @@ fn calc_util(curr: &procfs::CpuStat, prev: &procfs::CpuStat) -> Result<f64> {
212201 stolen_usec : Some ( curr_stolen) ,
213202 ..
214203 } ,
204+ procfs:: CpuStat {
205+ user_usec : Some ( prev_user) ,
206+ nice_usec : Some ( prev_nice) ,
207+ system_usec : Some ( prev_system) ,
208+ idle_usec : Some ( prev_idle) ,
209+ iowait_usec : Some ( prev_iowait) ,
210+ irq_usec : Some ( prev_irq) ,
211+ softirq_usec : Some ( prev_softirq) ,
212+ stolen_usec : Some ( prev_stolen) ,
213+ ..
214+ } ,
215215 ) => {
216216 let idle_usec = curr_idle - prev_idle;
217217 let iowait_usec = curr_iowait - prev_iowait;
0 commit comments