Exemple #1
0
        // The benchmark config and algorithm must guarantee that they are compatible with miner
        // we guarantee algorithm is supported
        // we will not have empty benchmark configs, all benchmark configs will have device list
        virtual public void BenchmarkStart(int time, IBenchmarkComunicator benchmarkComunicator)
        {
            BenchmarkComunicator     = benchmarkComunicator;
            BenchmarkTimeInSeconds   = time;
            BenchmarkSignalFinnished = true;
            // check and kill
            BenchmarkHandle           = null;
            OnBenchmarkCompleteCalled = false;
            BenchmarkTimeOutStopWatch = null;


            try {
                if (!Directory.Exists("logs"))
                {
                    Directory.CreateDirectory("logs");
                }
            } catch { }
            bench_lines      = new List <string>();
            benchmarkLogPath = String.Format("{0}Log_{1}_{2}", Logger._logPath, MiningSetup.MiningPairs[0].Device.UUID, MiningSetup.MiningPairs[0].Algorithm.AlgorithmStringID);

            string CommandLine = BenchmarkCreateCommandLine(BenchmarkAlgorithm, time);

            Thread BenchmarkThread = new Thread(BenchmarkThreadRoutine);

            BenchmarkThread.Start(CommandLine);
        }
Exemple #2
0
        // The benchmark config and algorithm must guarantee that they are compatible with miner
        // we guarantee algorithm is supported
        // we will not have empty benchmark configs, all benchmark configs will have device list
        public virtual void BenchmarkStart(int time, IBenchmarkComunicator benchmarkComunicator)
        {
            BenchmarkComunicator     = benchmarkComunicator;
            BenchmarkTimeInSeconds   = time;
            BenchmarkSignalFinnished = true;
            // check and kill
            BenchmarkHandle            = null;
            OnBenchmarkCompleteCalled  = false;
            _benchmarkTimeOutStopWatch = null;


            try
            {
                if (!Directory.Exists("logs"))
                {
                    Directory.CreateDirectory("logs");
                }
            }
            catch { }
            BenchLines        = new List <string>();
            _benchmarkLogPath =
                $"{Logger.LogPath}Log_{MiningSetup.MiningPairs[0].Device.Uuid}_{MiningSetup.MiningPairs[0].Algorithm.AlgorithmStringID}";

            var commandLine = BenchmarkCreateCommandLine(BenchmarkAlgorithm, time);

            var benchmarkThread = new Thread(BenchmarkThreadRoutine);

            benchmarkThread.Start(commandLine);
        }
Exemple #3
0
        // The benchmark config and algorithm must guarantee that they are compatible with miner
        // we guarantee algorithm is supported
        // we will not have empty benchmark configs, all benchmark configs will have device list
        virtual public void BenchmarkStart(int time, IBenchmarkComunicator benchmarkComunicator)
        {
            BenchmarkComunicator     = benchmarkComunicator;
            BenchmarkTimeInSeconds   = time;
            BenchmarkSignalFinnished = true;
            // check and kill
            BenchmarkHandle           = null;
            OnBenchmarkCompleteCalled = false;
            BenchmarkTimeOutStopWatch = null;

            string CommandLine = BenchmarkCreateCommandLine(BenchmarkAlgorithm, time);

            Thread BenchmarkThread = new Thread(BenchmarkThreadRoutine);

            BenchmarkThread.Start(CommandLine);
        }
Exemple #4
0
        // The benchmark config and algorithm must guarantee that they are compatible with miner
        // we guarantee algorithm is supported
        // we will not have empty benchmark configs, all benchmark configs will have device list
        virtual public void BenchmarkStart(ComputeDevice benchmarkDevice, Algorithm algorithm, int time, IBenchmarkComunicator benchmarkComunicator)
        {
            // for extra launch parameters parsing purposes
            benchmarkDevice.MostProfitableAlgorithm = algorithm;

            BenchmarkComunicator     = benchmarkComunicator;
            BenchmarkAlgorithm       = algorithm;
            BenchmarkTimeInSeconds   = time;
            BenchmarkSignalFinnished = true;
            // check and kill
            BenchmarkHandle           = null;
            OnBenchmarkCompleteCalled = false;
            BenchmarkTimeOutStopWatch = null;

            string CommandLine = BenchmarkCreateCommandLine(algorithm, time);

            Thread BenchmarkThread = new Thread(BenchmarkThreadRoutine);

            BenchmarkThread.Start(CommandLine);
        }
Exemple #5
0
        // The benchmark config and algorithm must guarantee that they are compatible with miner
        // we guarantee algorithm is supported
        // we will not have empty benchmark configs, all benchmark configs will have device list
        public virtual void BenchmarkStart(int time, IBenchmarkComunicator benchmarkComunicator)
        {
            BenchmarkComunicator = benchmarkComunicator;
            BenchmarkTimeInSeconds = time;
            BenchmarkSignalFinnished = true;
            // check and kill
            BenchmarkHandle = null;
            OnBenchmarkCompleteCalled = false;
            BenchmarkTimeOutStopWatch = null;

            string CommandLine = BenchmarkCreateCommandLine(BenchmarkAlgorithm, time);

            Thread BenchmarkThread = new Thread(BenchmarkThreadRoutine);
            BenchmarkThread.Start(CommandLine);
        }