Reputation: 9
I am refactoring some core functionalities in my nodejs api that utilizes graphql. Api is used as a proxy, takes requests from multiple sources and passes them on to multiple apis depending on request. I was wondering how I can do some overall performance test, to compare the current api version performance and performance after i do the refactor to see if I haven't at least decreased performance?
Upvotes: 0
Views: 3130
Reputation: 1
I also try easygraphql-load-tester but it really not help. We use Jmeter to check load test of GraphQL APIs. it really help to us in it you canget exact response, api pass count , api fail count, even you can get the data in excelsheet format, and to add different variable you can create excel file and import in it. Even we can generate graph in it to check api perforamnce.
Upvotes: -1
Reputation: 504
You can try easygraphql-load-tester; it'll create all the queries for you, just pass the schema and the arguments!
Here is an example using Artillery.io and here is another example using K6
With this load-testing it was possible to identify a bad implementation of dataloaders on the server
All virtual users finished
Summary report @ 10:07:55(-0500) 2018-11-23
Scenarios launched: 5
Scenarios completed: 5
Requests completed: 295
RPS sent: 36.88
Request latency:
min: 1.6
max: 470.9
median: 32.9
p95: 233.2
p99: 410.8
Scenario counts:
GraphQL Query load test: 5 (100%)
Codes:
200: 295
All virtual users finished
Summary report @ 10:09:09(-0500) 2018-11-23
Scenarios launched: 5
Scenarios completed: 5
Requests completed: 295
RPS sent: 65.85
Request latency:
min: 1.5
max: 71.9
median: 3.3
p95: 19.4
p99: 36.2
Scenario counts:
GraphQL Query load test: 5 (100%)
Codes:
200: 295
Upvotes: 0
Reputation: 21
Have you looked into Apollo Engine, awesome GraphQl analytics platform from the guys who made Apollo Client. Easy install and free. Was released this week. https://dev-blog.apollodata.com/introducing-apollo-engine-insights-error-reporting-and-caching-for-graphql-6a55147f63fc
Upvotes: 2
Reputation: 1365
You could do the stress test on your api endpoints to compare the results.
Using Loader.io may be your best approach. https://loader.io/
Be aware to text multiple times and clear the cache for each testing.
Upvotes: 2