public float this[string path] { get { int pathId = m_paths.TryGetIndexFromPath(path); if (pathId != -1) { return(this[pathId]); } else { return(0.0f); } } set { int pathId = m_paths.TryGetIndexFromPath(path); if (pathId == -1) { pathId = m_paths.AddPath(path); } this[pathId] = value; } }
void AddValueStatsAndItemData(IEnumerable <ProfilerRDI> PRDIs, IEnumerable <OverviewRDI> ORDIs) { lock (m_baseLogData) { foreach (ProfilerRDI prdi in PRDIs) { AddValueStats(prdi.LeafPath, !prdi.IsLeaf); if (!prdi.IsLeaf) { m_baseLogData.SetItemMetaData(prdi.LeafPath, prdi.ItemType); m_viewPaths.AddPath(prdi.LeafPath); } } } foreach (OverviewRDI ordi in ORDIs) { if (ordi.IsLeaf) { AddValueStats(ordi.Path, false); } } }
public LogView(LogControl logControl, LogRange logRange) { m_logControl = logControl; m_baseLogData = logRange.m_logData; m_baseViewFRs = new List <ViewFrameRecord>(m_baseLogData.FrameRecords.Count); m_viewPaths = new FrameRecordPathCollection(); ExpandBaseVFRs(m_baseLogData.FrameRecords.Count - 1); SocketLogData socketLogData = m_baseLogData as SocketLogData; if (socketLogData != null) { socketLogData.AddListeningLogView(this); } if (logRange.m_frr != null) { FrameRecordRange frr = logRange.m_frr; m_logData = new LogData(m_baseLogData, frr); m_viewFRs = new List <ViewFrameRecord>(m_baseViewFRs.GetRange(frr.StartIdx, frr.EndIdx - frr.StartIdx + 1)); } else { m_logData = m_baseLogData; m_viewFRs = m_baseViewFRs; } string logName = m_logData.Name; int idx = logName.LastIndexOf('\\') + 1; if (idx != -1) { logName = logName.Substring(idx); // get the filename without the path } idx = logName.IndexOf(".bin"); if (idx != -1) { logName = logName.Substring(0, idx); // remove .bin } m_name = logName; // these are searched in order m_graphDescs = new IGraphDesc[] { new CProfileGraphDesc("/Threads/", new ProfileGraphLeafDesc("selfTimeInMS", EItemType.Float)), new CProfileGraphDesc("/ParticlesColliding/", new ProfileGraphLeafDesc("count", EItemType.Int)), new CProfileGraphDesc("/PhysEntities/", new ProfileGraphLeafDesc("time", EItemType.Float)), new CProfileGraphDesc("/DrawCalls/", new ProfileGraphLeafDesc("totalDrawCallCount", EItemType.Int)), new CProfileGraphDesc("/NetworkProfile/", new ProfileGraphLeafDesc("totalBits", EItemType.Int)), new CProfileGraphDesc("/TexStrm/", new ProfileGraphLeafDesc("requiredMB", EItemType.Float), new ProfileGraphLeafDesc("mip", EItemType.Float)), new CProfileGraphDesc("/TexPools/", new ProfileGraphLeafDesc("n", EItemType.Int)), new CProfileGraphDesc("/SoundInfo/", new ProfileGraphLeafDesc("count", EItemType.Int)), new CProfileGraphDesc("/ObjMan/", new ProfileGraphLeafDesc("sizeKB", EItemType.Float)), new COverviewGraphDesc("/**") }; m_viewPaths.AddPath(logControl.m_prdiTree.LeafPath); }