Skip to content

Commit f06fb88

Browse files
committed
Remove unused code and comments
1 parent c87811a commit f06fb88

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

httpclient/httpclient_request.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -257,11 +257,6 @@ func (c *Client) executeRequest(method, endpoint string, body, out interface{},
257257
// Construct URL using the ConstructAPIResourceEndpoint function
258258
url := c.APIHandler.ConstructAPIResourceEndpoint(c.InstanceName, endpoint, log)
259259

260-
// Initialize total request counter
261-
//c.PerfMetrics.lock.Lock()
262-
//c.PerfMetrics.TotalRequests++
263-
//c.PerfMetrics.lock.Unlock()
264-
265260
// Perform Request
266261
req, err := http.NewRequest(method, url, bytes.NewBuffer(requestData))
267262
if err != nil {
@@ -273,9 +268,6 @@ func (c *Client) executeRequest(method, endpoint string, body, out interface{},
273268
headerManager.SetRequestHeaders(endpoint)
274269
headerManager.LogHeaders(c)
275270

276-
// Start response time measurement
277-
//responseTimeStart := time.Now()
278-
// Set the context with the request ID
279271
req = req.WithContext(ctx)
280272

281273
// Execute the HTTP request
@@ -284,10 +276,6 @@ func (c *Client) executeRequest(method, endpoint string, body, out interface{},
284276
return nil, err
285277
}
286278

287-
// After each request, compute and update response time
288-
//responseDuration := time.Since(responseTimeStart)
289-
//c.updatePerformanceMetrics(responseDuration)
290-
291279
// Checks for the presence of a deprecation header in the HTTP response and logs if found.
292280
CheckDeprecationHeader(resp, log)
293281

0 commit comments

Comments
 (0)