public KeyValueStreams(StreamConfig config)
 {
     this.queueCapacity = config.streamCapacity;
     this.walkIndex = 0;
     this.duplicatedPercantage = config.duplicatedRate;
     Thread auxiFillThread = new Thread(() => __fillStreamQueue(auxiliaryQueue));
     __fillStreamQueue(requestQueue);
     auxiFillThread.Start();
 }
Exemple #2
0
 public AutoTest(StreamConfig streamSettings, String configFileName, int totalTime, int intervalTime, string testName = null)
 {
     this.streamConfig = streamSettings;
     this.totalTime = totalTime;
     this.intervalTime = intervalTime;
     this.testName = testName;
     REPORTER("[Load Config File] :" + configFileName);
     if (testName == null)
     {
         string[] split = configFileName.Split('/');
         //testname is set as config file name by default
         this.testName = split[split.Length - 1].Split('.')[0];
     }
     __ReadFileToConfigList(configFileName);
 }
Exemple #3
0
 static void Main(string[] args)
 {
     APRuntime.Initialize("HydraBenchmark.ini");
     string[] fileNameSet = Directory.GetFiles(configFilePath);
     StreamConfig streams = new StreamConfig(10000, 10);
     foreach (string x in fileNameSet)
     {
         string[] sp = x.Split(testConfig.configFileSeparator);
         if (sp.Length < 2 || sp[1] != testConfig.configFileSuffix) continue;
         AutoTest test = new AutoTest(streams, x, totalTestTime, recordInterval);
         Console.WriteLine("[Config Start]: {0}", x);
         test.Run(TestRunMode.SingleThread, configFilePath);
         //test.Run(TestRunMode.Parrallel);
     }
     return;
 }
Exemple #4
0
        static void Main(string[] args)
        {
            APRuntime.Initialize("HydraBenchmark.ini");
            string[]     fileNameSet = Directory.GetFiles(configFilePath);
            StreamConfig streams     = new StreamConfig(10000, 10);

            foreach (string x in fileNameSet)
            {
                string[] sp = x.Split(testConfig.configFileSeparator);
                if (sp.Length < 2 || sp[1] != testConfig.configFileSuffix)
                {
                    continue;
                }
                AutoTest test = new AutoTest(streams, x, totalTestTime, recordInterval);
                Console.WriteLine("[Config Start]: {0}", x);
                test.Run(TestRunMode.SingleThread, configFilePath);
                //test.Run(TestRunMode.Parrallel);
            }
            return;
        }