Ejemplo n.º 1
0
 static void ShowExample(IStatsdClient statsd)
 {
     statsd.Gauge(bucketPrefix + "gauge", 500);
     statsd.Timing(bucketPrefix + "timer", 500);
     statsd.Increment(bucketPrefix + "counter");
     statsd.Decrement(bucketPrefix + "counter");
     statsd.UpdateCount(2, bucketPrefix + "counter");
     statsd.UpdateCount(4, 0, bucketPrefix + "counter", bucketPrefix + "counter2");
     statsd.UpdateCount(8, 2, bucketPrefix + "counter", bucketPrefix + "counter2");
 }
Ejemplo n.º 2
0
 static void ShowExample(IStatsdClient statsd)
 {
     statsd.Gauge(bucketPrefix + "gauge", 500);
     statsd.Timing(bucketPrefix + "timer", 500);
     statsd.Increment(bucketPrefix + "counter");
     statsd.Decrement(bucketPrefix + "counter");
     statsd.UpdateCount(2, bucketPrefix + "counter");
     statsd.UpdateCount(4, 0, bucketPrefix + "counter", bucketPrefix + "counter2");
     statsd.UpdateCount(8, 2, bucketPrefix + "counter", bucketPrefix + "counter2");
 }
Ejemplo n.º 3
0
        public void SendMessages(Object threadContext)
        {
            int threadIndex = (int)threadContext;

            for (int i = 0; i < 10000000; i++)
            {
                //Thread.Sleep(r.Next(5));
                DateTime start = DateTime.Now;
                statsd.Increment(bucketPrefix + "threadpool.thread");
//                statsd.Increment(bucketPrefix + "threadpool.thread" + threadIndex);
                int elapsedTimeMillis = Convert.ToInt32((DateTime.Now - start).TotalMilliseconds);
                statsd.Timing(bucketPrefix + "threadpool.incr_time", elapsedTimeMillis);
            }
            doneEvent.Set();
        }