@@ -151,8 +151,8 @@ const TopStore = Reflux.createStore({
151151 debug ( 'Error: top response from DB missing fields' , value ) ;
152152 }
153153 t2s [ collname ] = {
154- loadPercentR : value . readLock . time ,
155- loadPercentW : value . writeLock . time ,
154+ loadPercentRead : value . readLock . time ,
155+ loadPercentWrite : value . writeLock . time ,
156156 loadPercent : value . total . time ,
157157 } ;
158158 }
@@ -171,25 +171,31 @@ const TopStore = Reflux.createStore({
171171 const t1 =
172172 collname in this . t1s
173173 ? this . t1s [ collname ]
174- : { loadPercent : 0 , loadPercentR : 0 , loadPercentW : 0 } ;
174+ : { loadPercent : 0 , loadPercentRead : 0 , loadPercentWrite : 0 } ;
175175 const t2 = t2s [ collname ] ;
176176
177177 const tDelta = t2 . loadPercent - t1 . loadPercent ;
178178
179- const loadW =
179+ const loadWrite =
180180 tDelta === 0
181181 ? 0
182- : round ( ( ( t2 . loadPercentW - t1 . loadPercentW ) / tDelta ) * 100 , 0 ) ;
183- const loadR =
182+ : round (
183+ ( ( t2 . loadPercentWrite - t1 . loadPercentWrite ) / tDelta ) * 100 ,
184+ 0
185+ ) ;
186+ const loadRead =
184187 tDelta === 0
185188 ? 0
186- : round ( ( ( t2 . loadPercentR - t1 . loadPercentR ) / tDelta ) * 100 , 0 ) ;
189+ : round (
190+ ( ( t2 . loadPercentRead - t1 . loadPercentRead ) / tDelta ) * 100 ,
191+ 0
192+ ) ;
187193
188194 totals . push ( {
189195 collectionName : collname ,
190196 loadPercent : round ( ( tDelta * 100 ) / ( cadence * numCores ) , 2 ) , // System load.
191- loadPercentR : loadR ,
192- loadPercentW : loadW ,
197+ loadPercentRead : loadRead ,
198+ loadPercentWrite : loadWrite ,
193199 } ) ;
194200 }
195201 this . t1s = t2s ;
0 commit comments