Browse Source

Use nanoseconds

main
Quentin 6 months ago
parent
commit
0aaae1782a
Signed by: quentin GPG Key ID: A98E9B769E4FF428
  1. 12
      main.go

12
main.go

@ -23,7 +23,7 @@ import (
func main() {
fmt.Printf("op,latency\n")
fmt.Printf("endpoint,nanoseconds\n")
_, isSSL := os.LookupEnv("SSL");
opts := minio.Options {
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)
return
}
fmt.Printf("listbuckets,%v\n", elapsed.Milliseconds())
fmt.Printf("listbuckets,%v\n", elapsed.Nanoseconds())
}
for i := 0; i < 100; i++ {
@ -66,7 +66,7 @@ func main() {
log.Fatal("failed putObject: ",err)
return
}
fmt.Printf("putobject,%v\n", elapsed.Milliseconds())
fmt.Printf("putobject,%v\n", elapsed.Nanoseconds())
}
for i := 0; i < 100; i++ {
@ -84,7 +84,7 @@ func main() {
}
}
elapsed := time.Since(start)
fmt.Printf("listobjects,%v\n", elapsed.Milliseconds())
fmt.Printf("listobjects,%v\n", elapsed.Nanoseconds())
}
for i := 0; i < 100; i++ {
@ -100,7 +100,7 @@ func main() {
return
}
elapsed := time.Since(start)
fmt.Printf("getobject,%v\n", elapsed.Milliseconds())
fmt.Printf("getobject,%v\n", elapsed.Nanoseconds())
}
for i := 0; i < 100; i++ {
@ -112,6 +112,6 @@ func main() {
log.Fatal(err)
return
}
fmt.Printf("removeobject,%v\n", elapsed.Milliseconds())
fmt.Printf("removeobject,%v\n", elapsed.Nanoseconds())
}
}

Loading…
Cancel
Save