RN: Delete Systrace for RelayClassic

Reviewed By: TheSavior

Differential Revision: D7207462

fbshipit-source-id: 6dd5c5fd22c0a5a7d77331d6adf7b362c3d3e037
This commit is contained in:
Tim Yung 2018-03-08 23:33:08 -08:00 committed by Facebook Github Bot
parent 118521c20b
commit a8c4b630fc
1 changed files with 0 additions and 34 deletions

View File

@ -13,18 +13,6 @@
const invariant = require('fbjs/lib/invariant');
type RelayProfiler = {
attachProfileHandler(
name: string,
handler: (name: string, state?: any) => () => void,
): void,
attachAggregateHandler(
name: string,
handler: (name: string, callback: () => void) => void,
): void,
};
const TRACE_TAG_REACT_APPS = 1 << 17; // eslint-disable-line no-bitwise
const TRACE_TAG_JS_VM_CALLS = 1 << 27; // eslint-disable-line no-bitwise
@ -195,28 +183,6 @@ const Systrace = {
}
},
/**
* Relay profiles use await calls, so likely occur out of current stack frame
* therefore async variant of profiling is used
**/
attachToRelayProfiler(relayProfiler: RelayProfiler) {
relayProfiler.attachProfileHandler('*', (name, state?) => {
if (state != null && state.queryName !== undefined) {
name += '_' + state.queryName;
}
const cookie = Systrace.beginAsyncEvent(name);
return () => {
Systrace.endAsyncEvent(name, cookie);
};
});
relayProfiler.attachAggregateHandler('*', (name, callback) => {
Systrace.beginEvent(name);
callback();
Systrace.endEvent();
});
},
/* This is not called by default due to perf overhead but it's useful
if you want to find traces which spend too much time in JSON. */
swizzleJSON() {