Use nanoseconds
This commit is contained in:
parent
cf89cb1aee
commit
0aaae1782a
1 changed files with 6 additions and 6 deletions
12
main.go
12
main.go
|
@ -23,7 +23,7 @@ import (
|
||||||
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
fmt.Printf("op,latency\n")
|
fmt.Printf("endpoint,nanoseconds\n")
|
||||||
_, isSSL := os.LookupEnv("SSL");
|
_, isSSL := os.LookupEnv("SSL");
|
||||||
opts := minio.Options {
|
opts := minio.Options {
|
||||||
Creds: credentials.NewStaticV4(os.Getenv("AWS_ACCESS_KEY_ID"), os.Getenv("AWS_SECRET_ACCESS_KEY"), ""),
|
Creds: credentials.NewStaticV4(os.Getenv("AWS_ACCESS_KEY_ID"), os.Getenv("AWS_SECRET_ACCESS_KEY"), ""),
|
||||||
|
@ -53,7 +53,7 @@ func main() {
|
||||||
log.Fatal("failed listbucket: ", err)
|
log.Fatal("failed listbucket: ", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
fmt.Printf("listbuckets,%v\n", elapsed.Milliseconds())
|
fmt.Printf("listbuckets,%v\n", elapsed.Nanoseconds())
|
||||||
}
|
}
|
||||||
|
|
||||||
for i := 0; i < 100; i++ {
|
for i := 0; i < 100; i++ {
|
||||||
|
@ -66,7 +66,7 @@ func main() {
|
||||||
log.Fatal("failed putObject: ",err)
|
log.Fatal("failed putObject: ",err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
fmt.Printf("putobject,%v\n", elapsed.Milliseconds())
|
fmt.Printf("putobject,%v\n", elapsed.Nanoseconds())
|
||||||
}
|
}
|
||||||
|
|
||||||
for i := 0; i < 100; i++ {
|
for i := 0; i < 100; i++ {
|
||||||
|
@ -84,7 +84,7 @@ func main() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elapsed := time.Since(start)
|
elapsed := time.Since(start)
|
||||||
fmt.Printf("listobjects,%v\n", elapsed.Milliseconds())
|
fmt.Printf("listobjects,%v\n", elapsed.Nanoseconds())
|
||||||
}
|
}
|
||||||
|
|
||||||
for i := 0; i < 100; i++ {
|
for i := 0; i < 100; i++ {
|
||||||
|
@ -100,7 +100,7 @@ func main() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
elapsed := time.Since(start)
|
elapsed := time.Since(start)
|
||||||
fmt.Printf("getobject,%v\n", elapsed.Milliseconds())
|
fmt.Printf("getobject,%v\n", elapsed.Nanoseconds())
|
||||||
}
|
}
|
||||||
|
|
||||||
for i := 0; i < 100; i++ {
|
for i := 0; i < 100; i++ {
|
||||||
|
@ -112,6 +112,6 @@ func main() {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
fmt.Printf("removeobject,%v\n", elapsed.Milliseconds())
|
fmt.Printf("removeobject,%v\n", elapsed.Nanoseconds())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue