To reproduce apollographql/react-apollo#2126 .
I've measured heap size with 10,000 SSR request under the following condition. All results indicate some memory increasing(about ~100 bytes / request).
Only instantiating an apollo client and rendering empty <ApolloProvider>
Using <Query>
but not waiting for the result
$ yarn --pure-lockfile
$ yarn build
First, start GraphQL server process:
$ yarn start-gql
Second, start SSR server process, which is the target to monitor:
$ yarn start-ssr
Next benchmark via ab command:
$ ab -n 1000 http://localhost:4010
After shutdown the SSR server process, heap.json
will be generated.
Finally, plot a heap size graph via the following:
$ ./plot.py
Send SIGUSR1
to the SSR server process.