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); }