MCPcopy Index your code
hub / github.com/cortexlabs/cortex / makeRequestLoop

Function makeRequestLoop

dev/load.go:246–264  ·  view source on GitHub ↗
(url string, jsonBytes []byte)

Source from the content-addressed store, hash-verified

244}
245
246func makeRequestLoop(url string, jsonBytes []byte) {
247 var i int
248 isFirstIteration := true
249 for true {
250 if !isFirstIteration && _requestDelay != 0 {
251 time.Sleep(_requestDelay)
252 }
253 isFirstIteration = false
254
255 if _numRequestsPerThread > 0 {
256 if i >= _numRequestsPerThread {
257 return
258 }
259 i++
260 }
261
262 makeRequest(url, jsonBytes)
263 }
264}
265
266func makeRequest(url string, jsonBytes []byte) {
267 request, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonBytes))

Callers 1

Calls 1

makeRequestFunction · 0.85

Tested by

no test coverage detected