Performance analysis and optimization of distributed workflows in heterogeneous network environments