コード例 #1
0
 public static void IncrementBy(long by)
 {
     try
     {
         Bucket bucket = GetBucket();
         bucket.IncrementCounter(by);
     }
     catch (Exception ex)
     {
         Configurator.Configuration.Logger.Error(ex.Message, ex);
     }
 }
コード例 #2
0
        public AddNamedMetric <T1> Increment(Expression <Func <T1, long> > incAttr, long by)
        {
            try
            {
                PropertyInfo pi = PropertyHelper <T1> .GetProperty(incAttr);

                _bucket.IncrementCounter(by, pi.Name, _filter);
            }
            catch (Exception ex)
            {
                Configurator.Configuration.Logger.Error(ex.Message, ex);
            }
            return(this);
        }
コード例 #3
0
        internal void Increment(Expression <Func <T1, long> > incAttr, long by, object filter)
        {
            try
            {
                PropertyInfo pi = PropertyHelper <T1> .GetProperty(incAttr);

                Bucket bucket = GetBucket();
                bucket.IncrementCounter(by, pi.Name, filter);
            }
            catch (Exception ex)
            {
                Configurator.Configuration.Logger.Error(ex.Message, ex);
            }
        }
コード例 #4
0
ファイル: Container.cs プロジェクト: thatisscary/Graphene
        public static AddNamedMetric <T1> Increment(Expression <Func <T1, long> > incAttr, long by)
        {
            Bucket bucket = null;

            try
            {
                var pi = PropertyHelper <T1> .GetProperty(incAttr);

                bucket = GetBucket();
                bucket.IncrementCounter(by, pi.Name);
            }
            catch (Exception ex)
            {
                Configurator.Configuration.Logger.Error(ex.Message, ex);
            }
            return(new AddNamedMetric <T1>(bucket, null));
        }
コード例 #5
0
        internal void Increment(ITrackable tracker, Resolution minResolution, DateTime timeSlot, string propertyName, long by, object filter)
        {
            try
            {
                _trackerType = typeof(T1);
                _tracker     = tracker;
                var trackerContainer = getTrackerContainer(this);

                var bucket = new Bucket(0, minResolution, timeSlot);
                trackerContainer._queuedBucket.Enqueue(bucket);
                bucket.IncrementCounter(by, propertyName, filter);
            }
            catch (Exception ex)
            {
                Configurator.Configuration.Logger.Error(ex.Message, ex);
            }
        }
コード例 #6
0
        internal void IncrementBy(long by, object filter)
        {
            Bucket bucket = GetBucket();

            bucket.IncrementCounter(by, filter);
        }