public void Before_each()
 {
     _stats = new Statsd(_udp, _randomGenerator, _stopwatch);
     _batch = _stats.CreateBatch();
 }
Example #2
0
 public static Task AddAsync(this IStatsdBatch batch, Func <Task> actionToTime, string statName, double sampleRate = 1) =>
 batch.AddAsync(actionToTime, statName.AsMemory(), sampleRate);
Example #3
0
 public static void Add(this IStatsdBatch batch, Action actionToTime, string statName, double sampleRate = 1) =>
 batch.Add(actionToTime, statName.AsSpan(), sampleRate);
Example #4
0
 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);
Example #5
0
 public static void Add <TCommandType>(this IStatsdBatch batch, string name, double value) where TCommandType : IAllowsDouble =>
 batch.Add <TCommandType>(name.AsSpan(), value);
Example #6
0
 public static void Add <TCommandType>(this IStatsdBatch batch, string name, int value) where TCommandType : IAllowsInteger =>
 batch.Add <TCommandType>(name.AsSpan(), value);