public void Before_each() { _stats = new Statsd(_udp, _randomGenerator, _stopwatch); _batch = _stats.CreateBatch(); }
public static Task AddAsync(this IStatsdBatch batch, Func <Task> actionToTime, string statName, double sampleRate = 1) => batch.AddAsync(actionToTime, statName.AsMemory(), sampleRate);
public static void Add(this IStatsdBatch batch, Action actionToTime, string statName, double sampleRate = 1) => batch.Add(actionToTime, statName.AsSpan(), sampleRate);
public static void Add <TCommandType>(this IStatsdBatch batch, string name, int value, double sampleRate) where TCommandType : IAllowsInteger, IAllowsSampleRate => batch.Add <TCommandType>(name.AsSpan(), value, sampleRate);
public static void Add <TCommandType>(this IStatsdBatch batch, string name, double value) where TCommandType : IAllowsDouble => batch.Add <TCommandType>(name.AsSpan(), value);
public static void Add <TCommandType>(this IStatsdBatch batch, string name, int value) where TCommandType : IAllowsInteger => batch.Add <TCommandType>(name.AsSpan(), value);