Пример #1
0
            public void Dispose()
            {
                if (m_sessionCounters != null)
                {
                    if (m_hit)
                    {
                        m_sessionCounters.m_getCacheEntry_Hit.Add(m_elapsed);
                    }
                    else
                    {
                        m_sessionCounters.m_getCacheEntry_Miss.Add(m_elapsed);
                    }

                    m_sessionCounters = null;
                }
            }
Пример #2
0
            public void Dispose()
            {
                if (m_sessionCounters != null)
                {
                    var timeUsed = m_elapsed;

                    switch (m_state)
                    {
                    case State.Hit:
                        m_sessionCounters.m_getStream_Hit.Add(m_size, timeUsed);
                        break;

                    case State.Miss:
                        m_sessionCounters.m_getStream_Miss.Add(timeUsed);
                        break;

                    case State.Fail:
                        m_sessionCounters.m_getStream_Fail.Add(timeUsed);
                        break;
                    }

                    m_sessionCounters = null;
                }
            }