Documentation
¶
Overview ¶
Package fiofilewriter provides a FileWriter based on FIO.
Index ¶
- Constants
- type FileWriter
- func (fw *FileWriter) Cleanup()
- func (fw *FileWriter) DataDirectory() string
- func (fw *FileWriter) DeleteDirectoryContents(opts map[string]string) (map[string]string, error)
- func (fw *FileWriter) DeleteEverything() error
- func (fw *FileWriter) DeleteRandomSubdirectory(opts map[string]string) (map[string]string, error)
- func (fw *FileWriter) WriteRandomFiles(opts map[string]string) (map[string]string, error)
Constants ¶
const ( DedupePercentStepField = "dedupe-percent" DeletePercentOfContentsField = "delete-contents-percent" FreeSpaceLimitField = "free-space-limit" IOLimitPerWriteAction = "io-limit-per-write" MaxDedupePercentField = "max-dedupe-percent" MaxDirDepthField = "max-dir-depth" MaxFileSizeField = "max-file-size" MaxNumFilesPerWriteField = "max-num-files-per-write" MinDedupePercentField = "min-dedupe-percent" MinFileSizeField = "min-file-size" MinNumFilesPerWriteField = "min-num-files-per-write" )
Option field names.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileWriter ¶
FileWriter implements a FileWriter over tools/fio.Runner.
func New ¶
func New() (*FileWriter, error)
New returns a FileWriter based on FIO. See tests/tools/fio for configuration details.
func (*FileWriter) DataDirectory ¶
func (fw *FileWriter) DataDirectory() string
DataDirectory returns the data directory configured. See tests/tools/fio for details.
func (*FileWriter) DeleteDirectoryContents ¶
DeleteDirectoryContents deletes some of the contents of random directory up to a specified depth, based on its input options:
- MaxDirDepthField
- DeletePercentOfContentsField
Default values are used for missing options. The method returns the effective options used along with the selected depth and the error if any. ErrNoOp is returned if no directory is found.
func (*FileWriter) DeleteEverything ¶
func (fw *FileWriter) DeleteEverything() error
DeleteEverything deletes all content.
func (*FileWriter) DeleteRandomSubdirectory ¶
DeleteRandomSubdirectory deletes a random directory up to a specified depth, based on its input options:
- MaxDirDepthField
Default values are used for missing options. The method returns the effective options used along with the selected depth and the error if any. ErrNoOp is returned if no directory is found.
func (*FileWriter) WriteRandomFiles ¶
WriteRandomFiles writes a number of files at some filesystem depth, based on its input options.
- MaxDirDepthField
- MaxFileSizeField
- MinFileSizeField
- MaxNumFilesPerWriteField
- MinNumFilesPerWriteField
- MaxDedupePercentField
- MinDedupePercentField
- DedupePercentStepField
Default values are used for missing options. The method returns the effective options used along with the selected depth and the error if any.