mirror of
https://github.com/status-im/react-native.git
synced 2025-02-10 16:36:25 +00:00
Added random js queue+execution time sampling in react native
This commit is contained in:
parent
96e9ad9aec
commit
c29c595126
@ -49,6 +49,9 @@ typedef struct section RCTHeaderSection;
|
|||||||
#define RCTGetSectByNameFromHeader getsectbynamefromheader
|
#define RCTGetSectByNameFromHeader getsectbynamefromheader
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
NSString *const RCTEnqueueNotification = @"RCTEnqueueNotification";
|
||||||
|
NSString *const RCTDequeueNotification = @"RCTDequeueNotification";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function returns the module name for a given class.
|
* This function returns the module name for a given class.
|
||||||
*/
|
*/
|
||||||
@ -926,10 +929,10 @@ static id<RCTJavaScriptExecutor> _latestJSExecutor;
|
|||||||
|
|
||||||
- (void)_invokeAndProcessModule:(NSString *)module method:(NSString *)method arguments:(NSArray *)args
|
- (void)_invokeAndProcessModule:(NSString *)module method:(NSString *)method arguments:(NSArray *)args
|
||||||
{
|
{
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"JS_PERF_ENQUEUE" object:nil userInfo:nil];
|
[[NSNotificationCenter defaultCenter] postNotificationName:RCTEnqueueNotification object:nil userInfo:nil];
|
||||||
|
|
||||||
RCTJavaScriptCallback processResponse = ^(id json, NSError *error) {
|
RCTJavaScriptCallback processResponse = ^(id json, NSError *error) {
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"JS_PERF_DEQUEUE" object:nil userInfo:nil];
|
[[NSNotificationCenter defaultCenter] postNotificationName:RCTDequeueNotification object:nil userInfo:nil];
|
||||||
[self _handleBuffer:json];
|
[self _handleBuffer:json];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user