Documentation
¶
Index ¶
Constants ¶
View Source
const Blocksize = 0x1 << 16 // 65,536 bytes, 2^16 bytes
Variables ¶
This section is empty.
Functions ¶
func ClearBufferCacheEveryThreeSeconds ¶
func ClearBufferCacheEveryThreeSeconds() error
the following should be run as a goroutine as part of the benchmark; clears the buffer cache every 3 seconds
Types ¶
type Mark ¶
type Mark struct { Start time.Time `json:"start_time"` TempDir string `json:"temp_dir"` AggregateTestFilesSizeInGiB float64 `json:"disk_space_used_gib"` NumReadersWriters int `json:"num_readers_and_writers"` PhysicalMemory uint64 `json:"physical_memory_bytes"` IODuration float64 `json:"iops_duration_seconds"` Results []Result `json:"results"` // contains filtered or unexported fields }
bench.Mark{} -- haha! Get it? "benchmark"!
func (*Mark) CreateRandomBlock ¶
func (Mark) MarshalJSON ¶
Thanks Choly! http://choly.ca/post/go-json-marshalling/
func (*Mark) RunIOPSTest ¶
func (*Mark) RunSequentialReadTest ¶
ReadTest must be called before IOPSTest otherwise ReadTest will mistake IOPSTest's random writes for file corruption
func (*Mark) RunSequentialWriteTest ¶
the Sequential Write test must be called before the other two tests, for it creates the files
func (*Mark) SetTempDir ¶
calling program should `defer os.RemoveAll(bm.TempDir)` to clean up after run
type Result ¶
type Result struct { Start time.Time `json:"start_time"` WrittenBytes int `json:"write_bytes"` WrittenDuration time.Duration `json:"write_seconds"` ReadBytes int `json:"read_bytes"` ReadDuration time.Duration `json:"read_seconds"` IOOperations int `json:"io_operations"` IODuration time.Duration `json:"io_seconds"` }
func (Result) MarshalJSON ¶
type ThreadResult ¶
Click to show internal directories.
Click to hide internal directories.