Skip to content

gurupras/slowfuse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slow-fuse

Library to simulate slow filesystems by creating a loopback FUSE mount with injected latency

Usage

slowfs

This repository comes with a built-in command slowfs that can be used to simulate slow FUSE loopback mounts.

$ slowfs --help

usage: slowfs [<flags>] [<mountpoint>] [<source>]

A FUSE mount with added latency

Flags:
      --help       Show context-sensitive help (also try --help-long and --help-man).
      --latency=0  Extra latency to add for each listing operation (in milliseconds)
  -v, --verbose    Verbose logs

Args:
  [<mountpoint>]  The location at which source is to be mounted
  [<source>]      Directory to mount

API

Creating a new SlowFUSE mount with 100ms latency

slowfs, err := slowfuse.New(root, 100*uint64(time.Millisecond))
server, err := slowfs.Mount(mountPoint)
server.Wait()

Caveats

Currently, latency is only injected for the following FUSE operations:

  • getattr
  • statfs
  • open
  • opendir
  • lookup

Create a PR or an issue for more fine-grained latency

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages