Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/pwa-kit-react-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## v3.10.0-dev (Feb 18, 2025)
- Fix the performance logging util to use the correct delimiter for the server-timing header. [#2225](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2295)

## v3.9.0 (Feb 18, 2025)
- Fix the performance logging util to not round duration. [#2199](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2199)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ export const withReactQuery = (Wrapped, options = {}) => {
// always include the index to avoid duplicate entries
const displayName = q.meta?.displayName ? `${q.meta?.displayName}:${i}` : `${i}`
res.__performanceTimer.mark(
`${PERFORMANCE_MARKS.reactQueryUseQuery}::${displayName}`,
`${PERFORMANCE_MARKS.reactQueryUseQuery}.${displayName}`,
'start'
)
return q
.fetch()
.then((result) => {
res.__performanceTimer.mark(
`${PERFORMANCE_MARKS.reactQueryUseQuery}::${displayName}`,
`${PERFORMANCE_MARKS.reactQueryUseQuery}.${displayName}`,
'end',
{
detail: q.queryHash
Expand Down
16 changes: 8 additions & 8 deletions packages/pwa-kit-react-sdk/src/utils/performance.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
*/
import logger from './logger-instance'
export const PERFORMANCE_MARKS = {
total: 'ssr:total',
renderToString: 'ssr:render-to-string',
routeMatching: 'ssr:route-matching',
loadComponent: 'ssr:load-component',
fetchStrategies: 'ssr:fetch-strategies',
reactQueryPrerender: 'ssr:fetch-strategies:react-query:pre-render',
reactQueryUseQuery: 'ssr:fetch-strategies:react-query:use-query',
getProps: 'ssr:fetch-strategies:get-prop'
total: 'ssr.total',
renderToString: 'ssr.render-to-string',
routeMatching: 'ssr.route-matching',
loadComponent: 'ssr.load-component',
fetchStrategies: 'ssr.fetch-strategies',
reactQueryPrerender: 'ssr.fetch-strategies.react-query.pre-render',
reactQueryUseQuery: 'ssr.fetch-strategies.react-query.use-query',
getProps: 'ssr.fetch-strategies.get-prop'
}

/**
Expand Down
Loading