Skip to content

Commit 50f86fa

Browse files
alexeylangaleclarson
authored andcommitted
Log query name for fetchRelayQuery
Reviewed By: yisun Differential Revision: D6692869 fbshipit-source-id: 5484070be9995c5294197b0c2766690fd7accefa
1 parent 6522110 commit 50f86fa

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Libraries/Performance/Systrace.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,10 @@ const Systrace = {
240240
* therefore async variant of profiling is used
241241
**/
242242
attachToRelayProfiler(relayProfiler: RelayProfiler) {
243-
relayProfiler.attachProfileHandler('*', (name) => {
243+
relayProfiler.attachProfileHandler('*', (name, state?) => {
244+
if (state != null && state.queryName !== undefined) {
245+
name += '_' + state.queryName
246+
}
244247
const cookie = Systrace.beginAsyncEvent(name);
245248
return () => {
246249
Systrace.endAsyncEvent(name, cookie);

0 commit comments

Comments
 (0)