Improved the flag name.
parent
02d14a685e
commit
dd0d1163f8
|
@ -24,8 +24,8 @@ import (
|
||||||
"github.com/jacobsa/fuse/fuseops"
|
"github.com/jacobsa/fuse/fuseops"
|
||||||
)
|
)
|
||||||
|
|
||||||
var fRandDelays = flag.Bool(
|
var fRandomDelays = flag.Bool(
|
||||||
"fuseutil.rand_delays", false,
|
"fuseutil.random_delays", false,
|
||||||
"If set, randomly delay each op received, to help expose concurrency issues.")
|
"If set, randomly delay each op received, to help expose concurrency issues.")
|
||||||
|
|
||||||
// An interface with a method for each op type in the fuseops package. This can
|
// An interface with a method for each op type in the fuseops package. This can
|
||||||
|
@ -117,7 +117,7 @@ func (s fileSystemServer) ServeOps(c *fuse.Connection) {
|
||||||
|
|
||||||
func (s fileSystemServer) handleOp(op fuseops.Op) {
|
func (s fileSystemServer) handleOp(op fuseops.Op) {
|
||||||
// Delay if requested.
|
// Delay if requested.
|
||||||
if *fRandDelays {
|
if *fRandomDelays {
|
||||||
const delayLimit = 100 * time.Microsecond
|
const delayLimit = 100 * time.Microsecond
|
||||||
delay := time.Duration(rand.Int63n(int64(delayLimit)))
|
delay := time.Duration(rand.Int63n(int64(delayLimit)))
|
||||||
time.Sleep(delay)
|
time.Sleep(delay)
|
||||||
|
|
Loading…
Reference in New Issue