Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Commit aa40281

Browse files
committed
support graphql endpoint for hasura
Signed-off-by: Sahil Yeole <[email protected]>
1 parent c7b3f47 commit aa40281

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

k6/bench.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const options = {
1818
},
1919
};
2020

21-
const url = 'http://localhost:8000/graphql';
21+
const url = __ENV.GRAPHQL_ENDPOINT || 'http://localhost:8000/graphql';
2222
const params = {
2323
headers: {
2424
'Connection': 'keep-alive',

k6/bench.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
test_name=$1
2-
benchmark=$2
1+
graphql_endpoint=$1
2+
type=$2
3+
test_name=$3
4+
benchmark=$4
35

4-
if [ "$IS_K6_CLOUD_ENABLED" == "true" ]; then
5-
k6 run k6/bench.js --quiet --out cloud --env TEST_NAME=$test_name --env BENCHMARK=$benchmark
6+
if [ "$IS_K6_CLOUD_ENABLED" == "true" ] && [ "$type" == "upload" ]; then
7+
k6 run k6/bench.js --quiet --out cloud --env TEST_NAME=$test_name --env BENCHMARK=$benchmark --env GRAPHQL_ENDPOINT=$graphql_endpoint
68
else
7-
k6 run k6/bench.js --quiet --env TEST_NAME=$test_name --env BENCHMARK=$benchmark
9+
k6 run k6/bench.js --quiet --env TEST_NAME=$test_name --env BENCHMARK=$benchmark --env GRAPHQL_ENDPOINT=$graphql_endpoint
810
fi

k6/warmup.sh

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)