Skip to content

Commit

Permalink
Merge pull request #13 from CapillarySoftware/fix_await_divide_by_0
Browse files Browse the repository at this point in the history
fix await divide by 0
  • Loading branch information
vrecan committed Jun 29, 2014
2 parents e5f7f32 + 6c62fdf commit 93e3d08
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ioStatTransform/ioStatTransform.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ func getAvgQueueSize(diffWeightedMillisDoingIo float64, time float64) (r float64
// ((sdc->rd_ticks - sdp->rd_ticks) + (sdc->wr_ticks - sdp->wr_ticks)) /
// ((double) (sdc->nr_ios - sdp->nr_ios)) : 0.0;
func getAwait(diffMillisWriting float64, diffMillisReading float64, diffIoTotal float64) (r float64) {
if(diffIoTotal <= 0) { r= 0.00; return}
totalRW :=diffMillisWriting + diffMillisReading
r = totalRW / diffIoTotal
return
Expand Down

0 comments on commit 93e3d08

Please sign in to comment.