private void UpdatePc() { float total = m_total; for (int i = 0; i < m_buckets.Count; ++i) { StreamingTypeBucket bucket = m_buckets[i] as StreamingTypeBucket; bucket.NumPc = Math.Min(100.0f, 100.0f * bucket.Num / total); } }
public void AddInterval(StreamingInterval iv) { ++m_total; int bucketIdx = m_typeToBucket[iv.Source]; StreamingTypeBucket bucket = m_buckets[bucketIdx] as StreamingTypeBucket; ++bucket.Num; UpdatePc(); }