public void ProcessSerializeExecutionTimeTest() { IWfProcessDescriptor processDesc = WfProcessTestCommon.CreateSimpleProcessDescriptor(); int totalProcesses = 40; //准备流程实例 List <IWfProcess> processes = ProcessTestHelper.StartupMultiProcesses(processDesc, totalProcesses); ProcessTestHelper.OutputExecutionTime(() => { foreach (IWfProcess process in processes) { XElementFormatter formatter = new XElementFormatter(); XElement root = formatter.Serialize(process); } }, string.Format("序列化{0}个流程", totalProcesses)); }