Skip to content

Commit

Permalink
support graphql endpoint for hasura
Browse files Browse the repository at this point in the history
Signed-off-by: Sahil Yeole <[email protected]>
  • Loading branch information
beelchester committed Jul 5, 2024
1 parent c7b3f47 commit aa40281
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion k6/bench.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const options = {
},
};

const url = 'http://localhost:8000/graphql';
const url = __ENV.GRAPHQL_ENDPOINT || 'http://localhost:8000/graphql';
const params = {
headers: {
'Connection': 'keep-alive',
Expand Down
12 changes: 7 additions & 5 deletions k6/bench.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
test_name=$1
benchmark=$2
graphql_endpoint=$1
type=$2
test_name=$3
benchmark=$4

if [ "$IS_K6_CLOUD_ENABLED" == "true" ]; then
k6 run k6/bench.js --quiet --out cloud --env TEST_NAME=$test_name --env BENCHMARK=$benchmark
if [ "$IS_K6_CLOUD_ENABLED" == "true" ] && [ "$type" == "upload" ]; then
k6 run k6/bench.js --quiet --out cloud --env TEST_NAME=$test_name --env BENCHMARK=$benchmark --env GRAPHQL_ENDPOINT=$graphql_endpoint
else
k6 run k6/bench.js --quiet --env TEST_NAME=$test_name --env BENCHMARK=$benchmark
k6 run k6/bench.js --quiet --env TEST_NAME=$test_name --env BENCHMARK=$benchmark --env GRAPHQL_ENDPOINT=$graphql_endpoint
fi
1 change: 0 additions & 1 deletion k6/warmup.sh

This file was deleted.

2 comments on commit aa40281

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Query Server Requests/sec Latency (ms) Relative
1 { posts { id userId title user { id name email }}}
[Tailcall] -nan -nan -nanx
[Netflix DGS] -nan -nan -nanx
[Hasura] -nan -nan -nanx
[Gqlgen] -nan -nan -nanx
[Caliban] -nan -nan -nanx
[async-graphql] -nan -nan -nanx
[Apollo GraphQL] -nan -nan -nanx
2 { posts { title }}
[Tailcall] -nan -nan -nanx
[Netflix DGS] -nan -nan -nanx
[Hasura] -nan -nan -nanx
[Gqlgen] -nan -nan -nanx
[Caliban] -nan -nan -nanx
[async-graphql] -nan -nan -nanx
[Apollo GraphQL] -nan -nan -nanx

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Query Server Requests/sec Latency (ms) Relative
1 { posts { id userId title user { id name email }}}
[Tailcall] -nan -nan -nanx
[Netflix DGS] -nan -nan -nanx
[Hasura] -nan -nan -nanx
[Gqlgen] -nan -nan -nanx
[Caliban] -nan -nan -nanx
[async-graphql] -nan -nan -nanx
[Apollo GraphQL] -nan -nan -nanx
2 { posts { title }}
[Tailcall] -nan -nan -nanx
[Netflix DGS] -nan -nan -nanx
[Hasura] -nan -nan -nanx
[Gqlgen] -nan -nan -nanx
[Caliban] -nan -nan -nanx
[async-graphql] -nan -nan -nanx
[Apollo GraphQL] -nan -nan -nanx

Please sign in to comment.