private bool ParserFile() { m_mapAllSampleList.Clear(); m_listAllSampleName.Clear(); if (m_content == null) { return(false); } List <NetSampleItem> listAll = m_content.profiler_samples; for (int i = 0; i < listAll.Count; i++) { NetSampleItem item = listAll[i]; List <NetSampleItem> list = m_mapAllSampleList[item.name]; if (list == null) { list = new List <NetSampleItem>(); m_mapAllSampleList.Add(item.name, list); m_listAllSampleName.Add(item.name); } list.Add(item); } return(true); }
public static void AddSample(string tag, string name, int data1 = 0, int data2 = 0, int data3 = 0) { if (EnableProfiler) { NetSampleItem item = new NetSampleItem(); item.name = tag + ":" + name; item.time = DateTime.Now.Ticks; item.data1 = data1; item.data2 = data2; item.data3 = data3; m_ListNetSamples.Add(item); } }