Add a very lightweight memory profiler to the prover or SDK to measure peak memory usage. Prometheus metrics may be a good candidate.