Exemple #1
0
 public static RunProcessCommand FromOperation(RunOperation operation, ILogger logger, ConfigManager config)
 {
     return(new RunProcessCommand()
     {
         Title = operation.Title,
         OriginalTitle = operation.Title,
         ExecutablePath = operation.ExecutablePath,
         Arguments = operation.Arguments,
         WorkingFolder = operation.WorkingFolder,
         Logger = logger,
         DontClearLog = operation.DontClearLog,
         Config = config,
         Confirmation = operation.Confirmation
     });
 }
Exemple #2
0
        private static void RunThreadOperations(RunOperation Operation)
        {
            int staggerTime = rand.Next(staggerMin * 1000, staggerMax * 1000);
            Log(string.Format("waiting {0} milliseconds to start user on thread {1}", staggerTime, System.Threading.Thread.CurrentThread.ManagedThreadId));
            System.Threading.Thread.Sleep(staggerTime);
            Log(string.Format("finished waiting to start user on thread {0}", System.Threading.Thread.CurrentThread.ManagedThreadId));

            for (int i = 0; i < parsedArgs.NumOps; i++)
            {
                Operation();
                DownTime();
                Console.WriteLine(System.Environment.NewLine);
            }
        }