Пример #1
0
        private JhCounters GetCounters()
        {
            JhCounters counters = new JhCounters();

            counters.groups = new AList <JhCounterGroup>(0);
            counters.name   = "name";
            return(counters);
        }
Пример #2
0
        internal static Counters FromAvro(JhCounters counters)
        {
            Counters result = new Counters();

            if (counters != null)
            {
                foreach (JhCounterGroup g in counters.groups)
                {
                    CounterGroup group = result.AddGroup(StringInterner.WeakIntern(g.name.ToString())
                                                         , StringInterner.WeakIntern(g.displayName.ToString()));
                    foreach (JhCounter c in g.counts)
                    {
                        group.AddCounter(StringInterner.WeakIntern(c.name.ToString()), StringInterner.WeakIntern
                                             (c.displayName.ToString()), c.value);
                    }
                }
            }
            return(result);
        }