mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-02 09:08:58 +08:00
Add JSON methods to systrace
Summary: public Add JSON methods to systraces Reviewed By: jspahrsummers Differential Revision: D2679719 fb-gh-sync-id: d8bbdc9577264b1de01d7bb52656f4f1a86a5982
This commit is contained in:
committed by
facebook-github-bot-7
parent
02b67d9d40
commit
e4dca7a1fa
@@ -80,6 +80,15 @@ var BridgeProfiling = {
|
||||
} catch(err) {}
|
||||
},
|
||||
|
||||
/* 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() {
|
||||
BridgeProfiling.measureMethods(JSON, 'JSON', [
|
||||
'parse',
|
||||
'stringify'
|
||||
]);
|
||||
},
|
||||
|
||||
/**
|
||||
* Measures multiple methods of a class. For example, you can do:
|
||||
* BridgeProfiling.measureMethods(JSON, 'JSON', ['parse', 'stringify']);
|
||||
|
||||
Reference in New Issue
Block a user