Skip to content

Commit

Permalink
chore(linters): Remove comment (#15950)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangxianfu committed Sep 30, 2024
1 parent bf08149 commit 778788a
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions plugins/inputs/diskio/diskio.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,18 +134,11 @@ func (d *DiskIO) Gather(acc telegraf.Accumulator) error {
deltaRWCount := float64(io.ReadCount + io.WriteCount - lastValue.ReadCount - lastValue.WriteCount)
deltaRWTime := float64(io.ReadTime + io.WriteTime - lastValue.ReadTime - lastValue.WriteTime)
deltaIOTime := float64(io.IoTime - lastValue.IoTime)
//await: The average time per I/O operation (ms)
//await = (new.readTime - old.readTime + new.writeTime - old.writeTime) / (new.readCount -old.readCount + new.writeCount - old.writeCount)
//svctm: The service time per I/O operation, excluding wait time (ms)
//svctm = (new.ioTime-old.ioTime)/(new.readCount -old.readCount + new.writeCount - old.writeCount)
fieldsG := make(map[string]interface{})
if deltaRWCount > 0 {
fieldsG["io_await"] = deltaRWTime / deltaRWCount
fieldsG["io_svctm"] = deltaIOTime / deltaRWCount
}
//util:The percentage of time the disk (%)
//itv:Represents the time interval between two statistics measurements
//util = (new.tot_ticks - old.tot_ticks)/ itv
itv := float64(collectTime.Sub(d.lastCollectTime).Milliseconds())
if itv > 0 {
fieldsG["io_util"] = 100 * deltaIOTime / itv
Expand Down

0 comments on commit 778788a

Please sign in to comment.