diff --git a/internal/hammer/hammer.go b/internal/hammer/hammer.go index 4e75089bb..ebd51ad6e 100644 --- a/internal/hammer/hammer.go +++ b/internal/hammer/hammer.go @@ -68,7 +68,8 @@ var ( bearerToken = flag.String("bearer_token", "", "The bearer token for auth. For GCP this is the result of `gcloud auth print-access-token`") bearerTokenWrite = flag.String("bearer_token_write", "", "The bearer token for auth to write. For GCP this is the result of `gcloud auth print-identity-token`. If unset will default to --bearer_token.") - forceHTTP2 = flag.Bool("force_http2", false, "Use HTTP/2 connections *only*") + httpTimeout = flag.Duration("http_timeout", 30*time.Second, "Timeout for HTTP requests") + forceHTTP2 = flag.Bool("force_http2", false, "Use HTTP/2 connections *only*") hc = &http.Client{ Transport: &http.Transport{ @@ -76,7 +77,7 @@ var ( MaxIdleConnsPerHost: 256, DisableKeepAlives: false, }, - Timeout: 30 * time.Second, + Timeout: *httpTimeout, } )