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:
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']);
|
||||
|
|
Loading…
Reference in New Issue