Esempio n. 1
0
 void Test01()
 {
     var gd = new Connect();
     var sample = new Sample
                      {
                          Method = "GET",
                          Uri = "/test",
                          Timestamp = DateTime.Now.TimeOfDay.TotalMilliseconds,
                          ResponseTime = 100,
                          CpuTime = 20,
                          Context =
                              new[]
                                  {
                                      new Context {Name = "/", ResponseTime = 11},
                                      new Context {Name = "/one", ResponseTime = 12},
                                      new Context {Name = "/two", ResponseTime = 13}
                                  }
                      };
     gd.Init("26873", "testing", logger, null);
     for (int i = 0; i < 1000; i++)
     {
         gd.Store(sample, logger, null);
         Thread.Sleep(300);
     }
     gd.Term(logger, null);
     Console.Read();
 }