Exemplo n.º 1
0
 public void Setup()
 {
     SuperCheapIOC.Reset();
     _statsd          = new Statsd();
     _listener        = new InAppListener();
     _backend         = new InAppBackend();
     _intervalService = new ControllableIntervalService();
     _outputBlock     = new OutputBufferBlock <GraphiteLine>();
     _client          = new StatsdClient.Statsd("", 0, outputChannel: new InAppListenerOutputChannel(_listener));
     _statsd.AddListener(_listener);
     _statsd.AddBackend(_backend);
 }
Exemplo n.º 2
0
 public void Setup()
 {
     _statsd          = new Statsd();
     _listener        = new InAppListener();
     _backend         = new InAppBackend();
     _intervalService = new ControllableIntervalService();
     _outputBlock     = new OutputBufferBlock <GraphiteLine>();
     _client          = new StatsdClient.Statsd("", 0, outputChannel: new InAppListenerOutputChannel(_listener));
     _statsd.AddListener(_listener);
     _statsd.AddBackend(_backend, _systemMetrics, "testing");
     _systemMetrics = Substitute.For <ISystemMetricsService>();
 }
        private Result TestOriginal(int iterations, string prefix)
        {
            var client = new StatsdClient.Statsd(null, 0, prefix: prefix, outputChannel: null); //gives us a null output channel.
            var result = new Result(iterations);

            for (int i = 0; i < iterations; i++)
            {
                client.LogGauge("Perfomanto", i);
            }
            result.Stop();

            return(result);
        }
Exemplo n.º 4
0
 public void Setup()
 {
   SuperCheapIOC.Reset();
   _statsd = new Statsd();
   _listener = new InAppListener();
   _backend = new InAppBackend();
   _intervalService = new ControllableIntervalService();
   _outputBlock = new OutputBufferBlock<GraphiteLine>();
   _client = new StatsdClient.Statsd("", 0, outputChannel : new InAppListenerOutputChannel(_listener));
   _statsd.AddListener(_listener);
   _statsd.AddBackend(_backend, _systemMetrics, "testing");
   _systemMetrics = new Mock<ISystemMetricsService>().Object;
 }