Пример #1
0
        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);
            }
        }
Пример #2
0
        public void AddInterval(StreamingInterval iv)
        {
            ++m_total;

            int bucketIdx = m_typeToBucket[iv.Source];
            StreamingTypeBucket bucket = m_buckets[bucketIdx] as StreamingTypeBucket;

            ++bucket.Num;

            UpdatePc();
        }