Add perf tests to avoid decoding the bundle completely

Reviewed By: jspahrsummers

Differential Revision: D2574965

fb-gh-sync-id: 7bea6b3af04ba7e15471cc94a324a6c4a1d3614d
This commit is contained in:
Frédéric Sagnes 2015-11-27 08:36:00 -08:00 committed by facebook-github-bot-5
parent 710b443af1
commit 599a130c9a
1 changed files with 3 additions and 0 deletions

View File

@ -198,6 +198,9 @@ RCT_EXTERN NSArray<Class> *RCTGetModuleClasses(void);
RCTPerformanceLoggerStart(RCTPLScriptDownload);
NSUInteger cookie = RCTProfileBeginAsyncEvent(0, @"JavaScript download", nil);
// Suppress a warning if RCTProfileBeginAsyncEvent gets compiled out
(void)cookie;
RCTSourceLoadBlock onSourceLoad = ^(NSError *error, NSData *source) {
RCTProfileEndAsyncEvent(0, @"init,download", cookie, @"JavaScript download", nil);
RCTPerformanceLoggerEnd(RCTPLScriptDownload);