public static Sample Deserialize(BinaryReader br) { Sample s = null; if (LuaDeepProfilerSetting.Instance.isLocal) { s = Sample.Deserialize(br); } else { s = new Sample(); s.calls = br.ReadInt32(); s.frameCount = br.ReadInt32(); s.fps = br.ReadSingle(); s.pss = br.ReadUInt32(); s.power = br.ReadSingle(); s.costLuaGC = br.ReadInt32(); s.costMonoGC = br.ReadInt32(); s.name = ReadString(br); s.costTime = br.ReadInt32(); s.currentLuaMemory = br.ReadInt32(); s.currentMonoMemory = br.ReadInt32(); int count = br.ReadUInt16(); for (int i = 0, imax = count; i < imax; i++) { Deserialize(br).fahter = s; } int lua_gc = 0; int mono_gc = 0; for (int i = 0, imax = s.childs.Count; i < imax; i++) { var item = s.childs[i]; lua_gc += item.costLuaGC; mono_gc += item.costMonoGC; } s.costLuaGC = Math.Max(lua_gc, s.costLuaGC); s.costMonoGC = Math.Max(mono_gc, s.costMonoGC); } return(s); }