Report jsc memory information to fbsystrace
Reviewed By: jspahrsummers Differential Revision: D2789593 fb-gh-sync-id: e31d5f174b9cf896ce3be6431d81264d1d240fdb
This commit is contained in:
parent
fe07a9c576
commit
8cabdbae1e
|
@ -147,6 +147,7 @@ class MessageQueue {
|
|||
this._queue = [[],[],[]];
|
||||
this._lastFlush = now;
|
||||
}
|
||||
Systrace.counterEvent('pending_js_to_native_queue', this._queue[0].length);
|
||||
if (__DEV__ && SPY_MODE && isFinite(module)) {
|
||||
console.log('JS->N : ' + this._remoteModuleTable[module] + '.' +
|
||||
this._remoteMethodTable[module][method] + '(' + JSON.stringify(params) + ')');
|
||||
|
|
|
@ -92,6 +92,18 @@ var Systrace = {
|
|||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* counterEvent registers the value to the profileName on the systrace timeline
|
||||
**/
|
||||
counterEvent(profileName?: any, value?: any) {
|
||||
if (_enabled) {
|
||||
profileName = typeof profileName === 'function' ?
|
||||
profileName() : profileName;
|
||||
global.nativeTraceCounter &&
|
||||
global.nativeTraceCounter(TRACE_TAG_REACT_APPS, profileName, value);
|
||||
}
|
||||
},
|
||||
|
||||
reactPerfMeasure(objName: string, fnName: string, func: any): any {
|
||||
return function (component) {
|
||||
if (!_enabled) {
|
||||
|
|
Loading…
Reference in New Issue