Exemplo n.º 1
0
        private void RunConsoleTests(string[] args)
        {
            String current_path = "";
            String iometer_path = "";
            String config_file_path = "";
            String drive_letter = "";
            IOmeterWrapper io_meter;

            // Set the current working directory path.
            current_path = Environment.CurrentDirectory;

            // Check for valid command args.
            if (args.Length == 2 && args[1] == "--help")
            {
                ezIOmeter_utility.PrintArgUseage();
                return;
            }

            for (int count = 0; count < args.Length; count++)
            {
                // Get the user specified drive letter.
                if (args[count].ToUpper() == "/D" || args[count].ToUpper() == "\\D")
                    drive_letter = args[count + 1];
            }

            // Set the IOmeter path.
            iometer_path = current_path + "\\IOmeter";

            // Set the settings.conf file path.
            config_file_path = current_path + "\\settings.conf";

            // Initialize IOmeter tool.
            io_meter = new IOmeterWrapper(current_path, iometer_path, config_file_path, new IOmeterWrapper.DisplayMessage(DisplayMessage));

            // Load IOmeter Workloads
            if (!io_meter.LoadIOmeterConfigFiles(current_path + "\\IOmeterConfigFiles"))
            {
                PrintConsoleError(String.Format("Unable to load .icf files from: '{0}'", current_path + "\\IOmeterConfigFiles"));
                return;
            }

            // Run the IOmeter Workloads
            io_meter.RunIOmeterTests(drive_letter);

            // Generate a summary result file.
            io_meter.CreateResultsSummaryFile();
        }
Exemplo n.º 2
0
        private void InitializeEzIOmeter()
        {
            // Initialize IOmeter tool.
            io_meter = new IOmeterWrapper(ezIOmeter_utility.WorkingDirectory, ezIOmeter_utility.IOmeterPath, ezIOmeter_utility.ConfigFilePath, new IOmeterWrapper.DisplayMessage(DisplayMessage));

            // Load IOmeter Workloads
            if (!io_meter.LoadIOmeterConfigFiles(ezIOmeter_utility.IOmeterConfigFilesPath))
                throw new Exception(String.Format("Unable to load .icf files from: '{0}'", ezIOmeter_utility.IOmeterConfigFilesPath));

            // Setup the bucket values.
            ezIOmeter_utility.SetupBuckets(this.Resources, io_meter);

            // Setup the initial workloads.
            ezIOmeter_utility.SetupWorkloads(ResultsToDisplay, io_meter);
        }