* querylog: delete code for time counter
This commit is contained in:
parent
305df63054
commit
a31116635e
@ -171,8 +171,6 @@ type Reader struct {
|
|||||||
fseeker fileSeeker // file seeker object
|
fseeker fileSeeker // file seeker object
|
||||||
fpos uint64 // current file offset
|
fpos uint64 // current file offset
|
||||||
nSeekRequests uint32 // number of Seek() requests made (finding a new line doesn't count)
|
nSeekRequests uint32 // number of Seek() requests made (finding a new line doesn't count)
|
||||||
|
|
||||||
// timecnt uint64
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type fileSeeker struct {
|
type fileSeeker struct {
|
||||||
@ -208,13 +206,6 @@ func (r *Reader) Close() {
|
|||||||
log.Debug("querylog: read %d entries in %v, %v/entry, seek-reqs:%d",
|
log.Debug("querylog: read %d entries in %v, %v/entry, seek-reqs:%d",
|
||||||
r.count, elapsed, perunit, r.nSeekRequests)
|
r.count, elapsed, perunit, r.nSeekRequests)
|
||||||
|
|
||||||
// timePercent := uint64(0)
|
|
||||||
// if elapsed.Nanoseconds() != 0 {
|
|
||||||
// timePercent = r.timecnt * 100 / uint64(elapsed.Nanoseconds())
|
|
||||||
// }
|
|
||||||
// log.Debug("querylog: read %d entries in %v, %v/entry, seek-reqs:%d time:%dus (%d%%)",
|
|
||||||
// r.count, elapsed, perunit, r.nSeekRequests, r.timecnt/1000, timePercent)
|
|
||||||
|
|
||||||
if r.f != nil {
|
if r.f != nil {
|
||||||
r.f.Close()
|
r.f.Close()
|
||||||
}
|
}
|
||||||
@ -724,11 +715,8 @@ func (r *Reader) Next() *logEntry { // nolint
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
// st := time.Now()
|
|
||||||
var ent logEntry
|
var ent logEntry
|
||||||
decode(&ent, str)
|
decode(&ent, str)
|
||||||
// r.timecnt += uint64(time.Now().Sub(st).Nanoseconds())
|
|
||||||
|
|
||||||
return &ent
|
return &ent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user