aboutsummaryrefslogtreecommitdiff
path: root/weed/command/benchmark.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-12-13 00:58:58 -0800
committerChris Lu <chris.lu@gmail.com>2020-12-13 00:58:58 -0800
commite9cd798bd372741753efcba2af594b00fe7b8437 (patch)
treee291019e7394a874a292ee90c832a65745f57fd4 /weed/command/benchmark.go
parent16cd6fb27838db95054701f5567c93d51bf24d5f (diff)
downloadseaweedfs-e9cd798bd372741753efcba2af594b00fe7b8437.tar.xz
seaweedfs-e9cd798bd372741753efcba2af594b00fe7b8437.zip
adding volume type
Diffstat (limited to 'weed/command/benchmark.go')
-rw-r--r--weed/command/benchmark.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/command/benchmark.go b/weed/command/benchmark.go
index 080312aa8..7a112d1ec 100644
--- a/weed/command/benchmark.go
+++ b/weed/command/benchmark.go
@@ -35,6 +35,7 @@ type BenchmarkOptions struct {
sequentialRead *bool
collection *string
replication *string
+ volumeType *string
cpuprofile *string
maxCpu *int
grpcDialOption grpc.DialOption
@@ -62,6 +63,7 @@ func init() {
b.sequentialRead = cmdBenchmark.Flag.Bool("readSequentially", false, "randomly read by ids from \"-list\" specified file")
b.collection = cmdBenchmark.Flag.String("collection", "benchmark", "write data to this collection")
b.replication = cmdBenchmark.Flag.String("replication", "000", "replication type")
+ b.volumeType = cmdBenchmark.Flag.String("volumeType", "", "[hdd|ssd] choose between hard drive or solid state drive")
b.cpuprofile = cmdBenchmark.Flag.String("cpuprofile", "", "cpu profile output file")
b.maxCpu = cmdBenchmark.Flag.Int("maxCpu", 0, "maximum number of CPUs. 0 means all available CPUs")
b.fsync = cmdBenchmark.Flag.Bool("fsync", false, "flush data to disk after write")
@@ -234,6 +236,7 @@ func writeFiles(idChan chan int, fileIdLineChan chan string, s *stat) {
Count: 1,
Collection: *b.collection,
Replication: *b.replication,
+ VolumeType: *b.volumeType,
}
if assignResult, err := operation.Assign(b.masterClient.GetMaster(), b.grpcDialOption, ar); err == nil {
fp.Server, fp.Fid, fp.Collection = assignResult.Url, assignResult.Fid, *b.collection