Exemple #1
0
 public void ReadOneCountersUsingAnInterval()
 {
     var interval = new Interval(TimeSpan.FromMilliseconds(50), new[] {Sink}, new DefaultMachineNameProvider(), new DefaultCounterIdentifierGenerator());
     interval.AddDefinition(new CounterDefinition
     {
         CategoryName = "Processor",
         CounterName = "% Processor Time",
         InstanceName = "_Total",
         CollectInterval = 50
     });
     interval.Start();
     Thread.Sleep(400);
     interval.Stop();
     Assert.True(SentValues.Count >= 5);
 }