mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-10-15 14:04:53 +08:00
benchmarking writing data to a specific collection
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
|
||||
var (
|
||||
uploadReplication *string
|
||||
uploadCollection *string
|
||||
uploadDir *string
|
||||
include *string
|
||||
maxMB *int
|
||||
@@ -21,7 +22,8 @@ func init() {
|
||||
server = cmdUpload.Flag.String("server", "localhost:9333", "weedfs master location")
|
||||
uploadDir = cmdUpload.Flag.String("dir", "", "Upload the whole folder recursively if specified.")
|
||||
include = cmdUpload.Flag.String("include", "", "pattens of files to upload, e.g., *.pdf, *.html, ab?d.txt, works together with -dir")
|
||||
uploadReplication = cmdUpload.Flag.String("replication", "", "replication type(000,001,010,100,110,200)")
|
||||
uploadReplication = cmdUpload.Flag.String("replication", "", "replication type")
|
||||
uploadCollection = cmdUpload.Flag.String("collection", "", "optional collection name")
|
||||
maxMB = cmdUpload.Flag.Int("maxMB", 0, "split files larger than the limit")
|
||||
}
|
||||
|
||||
@@ -65,7 +67,7 @@ func runUpload(cmd *Command, args []string) bool {
|
||||
if e != nil {
|
||||
return e
|
||||
}
|
||||
results, e := operation.SubmitFiles(*server, parts, *uploadReplication, *maxMB)
|
||||
results, e := operation.SubmitFiles(*server, parts, *uploadReplication, *uploadCollection, *maxMB)
|
||||
bytes, _ := json.Marshal(results)
|
||||
fmt.Println(string(bytes))
|
||||
if e != nil {
|
||||
@@ -82,7 +84,7 @@ func runUpload(cmd *Command, args []string) bool {
|
||||
if e != nil {
|
||||
fmt.Println(e.Error())
|
||||
}
|
||||
results, _ := operation.SubmitFiles(*server, parts, *uploadReplication, *maxMB)
|
||||
results, _ := operation.SubmitFiles(*server, parts, *uploadReplication, *uploadCollection, *maxMB)
|
||||
bytes, _ := json.Marshal(results)
|
||||
fmt.Println(string(bytes))
|
||||
}
|
||||
|
Reference in New Issue
Block a user