-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Closed
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
Description
When calling RCTRenderingPerf.stop
, we automatically get the output from ReactPerf.printInclusive()
and ReactPerf.printWasted()
, but have no way of getting ReactPerf.printExclusive()
, as it is not exposed by the module.
Reproduction Steps and Sample Code
The following code will trigger the output from printInclusive
and printWasted
:
import PerfMonitor from 'react-native/Libraries/Performance/RCTRenderingPerf'
PerfMonitor.toggle()
PerfMonitor.start()
setTimeout(() => {
PerfMonitor.stop()
}, 1000)
Solution
Expose the output functions to be called directly instead of automatically calling some inside stop.
import PerfMonitor from 'react-native/Libraries/Performance/RCTRenderingPerf'
PerfMonitor.toggle()
PerfMonitor.start()
setTimeout(() => {
PerfMonitor.stop()
PerfMonitor.printExclusive()
PerfMonitor.printInclusive()
PerfMonitor.printWasted()
}, 1000)
I am happy to do a merge request for this.
Additional Information
- React Native version: 0.43.3
Metadata
Metadata
Assignees
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.