Stopwatch sw1 = new Stopwatch(); sw1.Start(); ViewBag.Memberinfo1 = VipMx.Memberinfo1(Id, "42"); sw1.Stop(); long usetime = sw1.ElapsedMilliseconds;