Server Timings are metrics that are sent via a header in the response of an HTTP request. They allow you to see how time is spent on the server from your browser DevTools, so you could optimize it if needed.
The Server Timings are enabled when one of the following condition is satisfied:
FRONT_COMMERCE_ENV !== "production"
The different timings available for an HTML page are:
- Compute config for request: how long it took to compute
- Resolve initial template: how long it took to retrieve the
index.htmltemplate needed for SSR
- Initialize GraphQL loaders: how long it took to initialize the GraphQL loaders needed for executing GraphQL queries during SSR
- React App initialization: how long it took to create the base React component that will be rendered during SSR
- Resolve Apollo queries: how long it took to retrieve all the data needed to render the page
- Render final HTML: how long it took to render the final HTML page
We plan to add finer server timings in the future. If you believe that there should be another, please contact us and we will look into it.
For further information about SSR, you can read the Server Side Rendering documentation page,
You can setup your own Server Timings by using
These methods come from the
server-timing package. Please refer to this package’s documentation for detailed usage.