Improved the flag name.

geesefs-0-30-9
Aaron Jacobs 2015-04-02 11:20:53 +11:00
parent 02d14a685e
commit dd0d1163f8
1 changed files with 3 additions and 3 deletions

View File

@ -24,8 +24,8 @@ import (
"github.com/jacobsa/fuse/fuseops"
)
var fRandDelays = flag.Bool(
"fuseutil.rand_delays", false,
var fRandomDelays = flag.Bool(
"fuseutil.random_delays", false,
"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
@ -117,7 +117,7 @@ func (s fileSystemServer) ServeOps(c *fuse.Connection) {
func (s fileSystemServer) handleOp(op fuseops.Op) {
// Delay if requested.
if *fRandDelays {
if *fRandomDelays {
const delayLimit = 100 * time.Microsecond
delay := time.Duration(rand.Int63n(int64(delayLimit)))
time.Sleep(delay)