Skip to content

Commit 82b620e

Browse files
author
Kevin Li
committed
Adding last changes
1 parent ccbc2c7 commit 82b620e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

apirunner/apirunner.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,16 @@ func executeAPIandCalculate(profileName string, apiURL string, command string, p
125125
var avgTime float64
126126
var totalTime float64
127127
var count float64
128+
getRequestList := map[string]struct{}{"isaccountallowedtocreateofferingswithtags": {}, "readyforshutdown": {}, "cloudianisenabled": {}, "quotabalance": {},
129+
"quotasummary": {}, "quotatarifflist": {}, "quotaisenabled": {}, "quotastatement": {}}
130+
_, isInGetRequestList := getRequestList[command]
128131
isGetRequest, _ := regexp.MatchString("^(get|list|query|find)(\\w+)+$", command)
132+
129133
if iterations != 1 {
130134
log.Infof("Calling API %s for %d number of iterations with parameters %s", command, iterations, params)
131135
for i := 1; i <= iterations; i++ {
132136
log.Infof("Started with iteration %d for the command %s", i, command)
133-
elapsedTime, apicount, result := executeAPI(apiURL, params, isGetRequest)
137+
elapsedTime, apicount, result := executeAPI(apiURL, params, isGetRequest || isInGetRequestList)
134138
count = apicount
135139
if elapsedTime < minTime {
136140
minTime = elapsedTime

0 commit comments

Comments
 (0)