in src/go/pkg/file/readerwriter.go [86:137]
func (r *ReaderWriter) submitIOStatistics(
uniqueName string,
runName string,
start time.Time,
op Operation,
path string,
startReadBytesTime time.Time,
startCloseFileTime time.Time,
finish time.Time,
ioBytes int,
err error) {
if err != nil {
log.Error.Printf("%s io error '%s' (iobytes: %d): %v", op, path, ioBytes, err)
}
fileOpenTimeNS := NoDuration
if !startReadBytesTime.Before(start) {
fileOpenTimeNS = startReadBytesTime.Sub(start)
}
ioTimeNS := NoDuration
if !startCloseFileTime.Before(startReadBytesTime) {
ioTimeNS = startCloseFileTime.Sub(startReadBytesTime)
}
closeTimeNS := NoDuration
if !finish.Before(startCloseFileTime) {
closeTimeNS = finish.Sub(startCloseFileTime)
}
ioStats := InitializeIOStatistics(
start,
uniqueName,
runName,
r.label,
op,
path,
fileOpenTimeNS,
closeTimeNS,
ioTimeNS,
ioBytes,
err)
jsonBytes, err := ioStats.GetJSON()
if err != nil {
log.Error.Printf("error encountered submitting statistics: %v", err)
return
}
log.Debug.Printf(string(jsonBytes))
r.profiler.RecordTiming(jsonBytes)
}