Setting right processingTime

Ogi
New Contributor II

How to set just the right processingTime for readStream to maximize the performance? Based on which factors it depends and is there a way to measure this?