Пример #1
0
        public void Log(WrappedEvent wrappedEvent)
        {
            _wrappedEventsCache.AddItems(new List <WrappedEvent> {
                wrappedEvent
            });

            _acumulateSize += wrappedEvent.Size;

            if (_wrappedEventsCache.HasReachedMaxSize() || _acumulateSize >= MAX_SIZE_BYTES)
            {
                SendBulkEvents();
            }
        }
Пример #2
0
        public void Log(WrappedEvent wrappedEvent)
        {
            var dropped = _wrappedEventsCache.AddItems(new List <WrappedEvent> {
                wrappedEvent
            });

            if (dropped == 0)
            {
                _acumulateSize += wrappedEvent.Size;
            }

            RecordStats(dropped);

            if (_wrappedEventsCache.HasReachedMaxSize() || _acumulateSize >= MAX_SIZE_BYTES)
            {
                SendBulkEvents();
            }
        }
Пример #3
0
 public void Log(IList <KeyImpression> impressions)
 {
     _impressionsCache.AddItems(impressions);
 }
Пример #4
0
 public int Log(IList <KeyImpression> impressions)
 {
     return(_impressionsCache.AddItems(impressions));
 }