private void CalculateBars(Rect r, int frameIndex, float time) { ProfilerFrameDataIterator profilerFrameDataIterator = new ProfilerFrameDataIterator(); int groupCount = profilerFrameDataIterator.GetGroupCount(frameIndex); float num = 0f; profilerFrameDataIterator.SetRoot(frameIndex, 0); int threadCount = profilerFrameDataIterator.GetThreadCount(frameIndex); int i; for (i = 0; i < threadCount; i++) { profilerFrameDataIterator.SetRoot(frameIndex, i); string groupname = profilerFrameDataIterator.GetGroupName(); ProfilerTimelineGUI.GroupInfo groupInfo = this.groups.Find((ProfilerTimelineGUI.GroupInfo g) => g.name == groupname); if (groupInfo == null) { groupInfo = new ProfilerTimelineGUI.GroupInfo(); groupInfo.name = groupname; groupInfo.height = 20f; groupInfo.expanded = false; groupInfo.threads = new List <ProfilerTimelineGUI.ThreadInfo>(); this.groups.Add(groupInfo); if (groupname == string.Empty || groupname == "Unity Job System") { groupInfo.expanded = true; } } List <ProfilerTimelineGUI.ThreadInfo> threads = groupInfo.threads; ProfilerTimelineGUI.ThreadInfo threadInfo = threads.Find((ProfilerTimelineGUI.ThreadInfo t) => t.threadIndex == i); if (threadInfo == null) { threadInfo = new ProfilerTimelineGUI.ThreadInfo(); threadInfo.name = profilerFrameDataIterator.GetThreadName(); threadInfo.height = 0f; threadInfo.weight = (threadInfo.desiredWeight = (float)((!groupInfo.expanded) ? 0 : 1)); threadInfo.threadIndex = i; groupInfo.threads.Add(threadInfo); } if (threadInfo.weight != threadInfo.desiredWeight) { threadInfo.weight = threadInfo.desiredWeight * time + (1f - threadInfo.desiredWeight) * (1f - time); } num += threadInfo.weight; } float num2 = 16f * (float)groupCount; float num3 = r.height - num2; float num4 = num3 / (num + 2f); foreach (ProfilerTimelineGUI.GroupInfo current in this.groups) { foreach (ProfilerTimelineGUI.ThreadInfo current2 in current.threads) { current2.height = num4 * current2.weight; } } this.groups[0].expanded = true; this.groups[0].height = 0f; this.groups[0].threads[0].height = 3f * num4; }
private void CalculateBars(Rect r, int frameIndex, float time) { ProfilerFrameDataIterator iterator = new ProfilerFrameDataIterator(); int groupCount = iterator.GetGroupCount(frameIndex); float num2 = 0f; iterator.SetRoot(frameIndex, 0); int threadCount = iterator.GetThreadCount(frameIndex);
private void CalculateBars(Rect r, int frameIndex, float time) { ProfilerFrameDataIterator frameDataIterator = new ProfilerFrameDataIterator(); int groupCount = frameDataIterator.GetGroupCount(frameIndex); float num1 = 0.0f; frameDataIterator.SetRoot(frameIndex, 0); int threadCount = frameDataIterator.GetThreadCount(frameIndex); // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type ProfilerTimelineGUI.\u003CCalculateBars\u003Ec__AnonStoreyAD barsCAnonStoreyAd = new ProfilerTimelineGUI.\u003CCalculateBars\u003Ec__AnonStoreyAD(); // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field for (barsCAnonStoreyAd.i = 0; barsCAnonStoreyAd.i < threadCount; barsCAnonStoreyAd.i = barsCAnonStoreyAd.i + 1) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type ProfilerTimelineGUI.\u003CCalculateBars\u003Ec__AnonStoreyAC barsCAnonStoreyAc = new ProfilerTimelineGUI.\u003CCalculateBars\u003Ec__AnonStoreyAC(); // ISSUE: reference to a compiler-generated field barsCAnonStoreyAc.\u003C\u003Ef__ref\u0024173 = barsCAnonStoreyAd; // ISSUE: reference to a compiler-generated field frameDataIterator.SetRoot(frameIndex, barsCAnonStoreyAd.i); // ISSUE: reference to a compiler-generated field barsCAnonStoreyAc.groupname = frameDataIterator.GetGroupName(); // ISSUE: reference to a compiler-generated method ProfilerTimelineGUI.GroupInfo groupInfo = this.groups.Find(new Predicate<ProfilerTimelineGUI.GroupInfo>(barsCAnonStoreyAc.\u003C\u003Em__1F5)); if (groupInfo == null) { groupInfo = new ProfilerTimelineGUI.GroupInfo(); // ISSUE: reference to a compiler-generated field groupInfo.name = barsCAnonStoreyAc.groupname; groupInfo.height = 20f; groupInfo.expanded = false; groupInfo.threads = new List<ProfilerTimelineGUI.ThreadInfo>(); this.groups.Add(groupInfo); // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field if (barsCAnonStoreyAc.groupname == string.Empty || barsCAnonStoreyAc.groupname == "Unity Job System") groupInfo.expanded = true; } // ISSUE: reference to a compiler-generated method ProfilerTimelineGUI.ThreadInfo threadInfo1 = groupInfo.threads.Find(new Predicate<ProfilerTimelineGUI.ThreadInfo>(barsCAnonStoreyAc.\u003C\u003Em__1F6)); if (threadInfo1 == null) { threadInfo1 = new ProfilerTimelineGUI.ThreadInfo(); threadInfo1.name = frameDataIterator.GetThreadName(); threadInfo1.height = 0.0f; ProfilerTimelineGUI.ThreadInfo threadInfo2 = threadInfo1; ProfilerTimelineGUI.ThreadInfo threadInfo3 = threadInfo1; int num2 = !groupInfo.expanded ? 0 : 1; double num3; float num4 = (float) (num3 = (double) num2); threadInfo3.desiredWeight = (float) num3; double num5 = (double) num4; threadInfo2.weight = (float) num5; // ISSUE: reference to a compiler-generated field threadInfo1.threadIndex = barsCAnonStoreyAd.i; groupInfo.threads.Add(threadInfo1); } if ((double) threadInfo1.weight != (double) threadInfo1.desiredWeight) threadInfo1.weight = (float) ((double) threadInfo1.desiredWeight * (double) time + (1.0 - (double) threadInfo1.desiredWeight) * (1.0 - (double) time)); num1 += threadInfo1.weight; } float num6 = 16f * (float) groupCount; float num7 = (r.height - num6) / (num1 + 2f); using (List<ProfilerTimelineGUI.GroupInfo>.Enumerator enumerator1 = this.groups.GetEnumerator()) { while (enumerator1.MoveNext()) { using (List<ProfilerTimelineGUI.ThreadInfo>.Enumerator enumerator2 = enumerator1.Current.threads.GetEnumerator()) { while (enumerator2.MoveNext()) { ProfilerTimelineGUI.ThreadInfo current = enumerator2.Current; current.height = num7 * current.weight; } } } } this.groups[0].expanded = true; this.groups[0].height = 0.0f; this.groups[0].threads[0].height = 3f * num7; }
private void CalculateBars(Rect r, int frameIndex, float time) { ProfilerFrameDataIterator frameDataIterator = new ProfilerFrameDataIterator(); int groupCount = frameDataIterator.GetGroupCount(frameIndex); float num1 = 0.0f; frameDataIterator.SetRoot(frameIndex, 0); int threadCount = frameDataIterator.GetThreadCount(frameIndex); // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type ProfilerTimelineGUI.\u003CCalculateBars\u003Ec__AnonStoreyAD barsCAnonStoreyAd = new ProfilerTimelineGUI.\u003CCalculateBars\u003Ec__AnonStoreyAD(); // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field for (barsCAnonStoreyAd.i = 0; barsCAnonStoreyAd.i < threadCount; barsCAnonStoreyAd.i = barsCAnonStoreyAd.i + 1) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type ProfilerTimelineGUI.\u003CCalculateBars\u003Ec__AnonStoreyAC barsCAnonStoreyAc = new ProfilerTimelineGUI.\u003CCalculateBars\u003Ec__AnonStoreyAC(); // ISSUE: reference to a compiler-generated field barsCAnonStoreyAc.\u003C\u003Ef__ref\u0024173 = barsCAnonStoreyAd; // ISSUE: reference to a compiler-generated field frameDataIterator.SetRoot(frameIndex, barsCAnonStoreyAd.i); // ISSUE: reference to a compiler-generated field barsCAnonStoreyAc.groupname = frameDataIterator.GetGroupName(); // ISSUE: reference to a compiler-generated method ProfilerTimelineGUI.GroupInfo groupInfo = this.groups.Find(new Predicate <ProfilerTimelineGUI.GroupInfo>(barsCAnonStoreyAc.\u003C\u003Em__1F5)); if (groupInfo == null) { groupInfo = new ProfilerTimelineGUI.GroupInfo(); // ISSUE: reference to a compiler-generated field groupInfo.name = barsCAnonStoreyAc.groupname; groupInfo.height = 20f; groupInfo.expanded = false; groupInfo.threads = new List <ProfilerTimelineGUI.ThreadInfo>(); this.groups.Add(groupInfo); // ISSUE: reference to a compiler-generated field // ISSUE: reference to a compiler-generated field if (barsCAnonStoreyAc.groupname == string.Empty || barsCAnonStoreyAc.groupname == "Unity Job System") { groupInfo.expanded = true; } } // ISSUE: reference to a compiler-generated method ProfilerTimelineGUI.ThreadInfo threadInfo1 = groupInfo.threads.Find(new Predicate <ProfilerTimelineGUI.ThreadInfo>(barsCAnonStoreyAc.\u003C\u003Em__1F6)); if (threadInfo1 == null) { threadInfo1 = new ProfilerTimelineGUI.ThreadInfo(); threadInfo1.name = frameDataIterator.GetThreadName(); threadInfo1.height = 0.0f; ProfilerTimelineGUI.ThreadInfo threadInfo2 = threadInfo1; ProfilerTimelineGUI.ThreadInfo threadInfo3 = threadInfo1; int num2 = !groupInfo.expanded ? 0 : 1; double num3; float num4 = (float)(num3 = (double)num2); threadInfo3.desiredWeight = (float)num3; double num5 = (double)num4; threadInfo2.weight = (float)num5; // ISSUE: reference to a compiler-generated field threadInfo1.threadIndex = barsCAnonStoreyAd.i; groupInfo.threads.Add(threadInfo1); } if ((double)threadInfo1.weight != (double)threadInfo1.desiredWeight) { threadInfo1.weight = (float)((double)threadInfo1.desiredWeight * (double)time + (1.0 - (double)threadInfo1.desiredWeight) * (1.0 - (double)time)); } num1 += threadInfo1.weight; } float num6 = 16f * (float)groupCount; float num7 = (r.height - num6) / (num1 + 2f); using (List <ProfilerTimelineGUI.GroupInfo> .Enumerator enumerator1 = this.groups.GetEnumerator()) { while (enumerator1.MoveNext()) { using (List <ProfilerTimelineGUI.ThreadInfo> .Enumerator enumerator2 = enumerator1.Current.threads.GetEnumerator()) { while (enumerator2.MoveNext()) { ProfilerTimelineGUI.ThreadInfo current = enumerator2.Current; current.height = num7 * current.weight; } } } } this.groups[0].expanded = true; this.groups[0].height = 0.0f; this.groups[0].threads[0].height = 3f * num7; }