Ejemplo n.º 1
0
        public StatsdMetric(string name, StatsdType type, double val)
        {
            Name = name;
            Type = type;
            _set = null;
            Lat = null;
            Value = val;
            NumUpdates = 1;

            switch (Type)
            {
                case StatsdType.StatsdSet:
                    _set = new HashSet<double> {val};
                    break;
                case StatsdType.StatsdTimer:
                    Lat = new Latency();
                    Lat.Min = Lat.Max = Lat.Sum = val;
                    Lat.Num = 1;
                    break;
            }
        }
Ejemplo n.º 2
0
        public StatsdMetric(string name, StatsdType type, double val)
        {
            Name       = name;
            Type       = type;
            _set       = null;
            Lat        = null;
            Value      = val;
            NumUpdates = 1;

            switch (Type)
            {
            case StatsdType.StatsdSet:
                _set = new HashSet <double> {
                    val
                };
                break;

            case StatsdType.StatsdTimer:
                Lat     = new Latency();
                Lat.Min = Lat.Max = Lat.Sum = val;
                Lat.Num = 1;
                break;
            }
        }