Log query name for fetchRelayQuery
Reviewed By: yisun Differential Revision: D6692869 fbshipit-source-id: 5484070be9995c5294197b0c2766690fd7accefa
This commit is contained in:
Родитель
1c3f6acfe5
Коммит
a9032a20ad
|
@ -240,7 +240,10 @@ const Systrace = {
|
||||||
* therefore async variant of profiling is used
|
* therefore async variant of profiling is used
|
||||||
**/
|
**/
|
||||||
attachToRelayProfiler(relayProfiler: RelayProfiler) {
|
attachToRelayProfiler(relayProfiler: RelayProfiler) {
|
||||||
relayProfiler.attachProfileHandler('*', (name) => {
|
relayProfiler.attachProfileHandler('*', (name, state?) => {
|
||||||
|
if (state != null && state.queryName !== undefined) {
|
||||||
|
name += '_' + state.queryName
|
||||||
|
}
|
||||||
const cookie = Systrace.beginAsyncEvent(name);
|
const cookie = Systrace.beginAsyncEvent(name);
|
||||||
return () => {
|
return () => {
|
||||||
Systrace.endAsyncEvent(name, cookie);
|
Systrace.endAsyncEvent(name, cookie);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче