adds serialization of stages to performance.
Merge branch 'fix_performance_stage'