This repository has been archived by the owner on Nov 2, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from steve-chavez/pgrst-rpc
postgrest: add RPC load tests and config for testing on t3a.nano..t3a.xlarge..c5.xlarge
- Loading branch information
Showing
10 changed files
with
344 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { Rate } from "k6/metrics"; | ||
import { check, group, sleep } from 'k6'; | ||
import http from 'k6/http'; | ||
|
||
const URL = "http://" + __ENV.HOST; | ||
|
||
const RATE = (function(){ | ||
if(__ENV.VERSION == 'v701'){ | ||
switch(__ENV.HOST){ | ||
case 'c5xlarge': return 2400; | ||
case 't3axlarge': return 1600; | ||
case 't3anano': return 1500; | ||
default: return 1000; | ||
} | ||
} | ||
else switch(__ENV.HOST){ | ||
case 'c5xlarge': return 3000; | ||
case 't3axlarge': return 2300; | ||
case 't3anano': return 2200; | ||
default: return 1000; | ||
} | ||
})(); | ||
|
||
export let options = { | ||
discardResponseBodies: true, | ||
scenarios: { | ||
constant_request_rate: { | ||
executor: 'constant-arrival-rate', | ||
rate: RATE, | ||
timeUnit: '1s', | ||
duration: '30s', | ||
preAllocatedVUs: 100, | ||
maxVUs: 600, | ||
} | ||
}, | ||
thresholds: { | ||
'failed requests': ['rate<0.1'], | ||
'http_req_duration': ['p(95)<1000'] | ||
} | ||
}; | ||
|
||
const myFailRate = new Rate('failed requests'); | ||
|
||
export default function() { | ||
let res = http.get(URL + "/rpc/ret_artists?select=*&artist_id=eq.3"); | ||
myFailRate.add(res.status !== 200); | ||
} |
Oops, something went wrong.