Improving the End-to-End Efficiency of Offline Inference for Multi-LLM Applications Based on Sampling and Simulation