Include the object inode by default.
parent
d31b0cbd81
commit
2dda1a5ea9
|
@ -132,18 +132,18 @@ func (o *commonOp) maybeTraceByPID(
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *commonOp) ShortDesc() (desc string) {
|
func (o *commonOp) ShortDesc() (desc string) {
|
||||||
name := reflect.TypeOf(o.op).String()
|
opName := reflect.TypeOf(o.op).String()
|
||||||
|
|
||||||
// The usual case: a string that looks like "*fuseops.GetInodeAttributesOp".
|
// Attempt to better handle the usual case: a string that looks like
|
||||||
|
// "*fuseops.GetInodeAttributesOp".
|
||||||
const prefix = "*fuseops."
|
const prefix = "*fuseops."
|
||||||
const suffix = "Op"
|
const suffix = "Op"
|
||||||
if strings.HasPrefix(name, prefix) && strings.HasSuffix(name, suffix) {
|
if strings.HasPrefix(opName, prefix) && strings.HasSuffix(opName, suffix) {
|
||||||
desc = name[len(prefix) : len(name)-len(suffix)]
|
opName = opName[len(prefix) : len(opName)-len(suffix)]
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Otherwise, it's not clear what to do.
|
// Include the inode number to which the op applies.
|
||||||
desc = name
|
desc = fmt.Sprintf("%s(inode=%v)", opName, o.bazilReq.Hdr().Node)
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue