Esempio n. 1
0
        public string ToLogString()
        {
            var sb = new StringBuilder()
                     .AppendLine($"[{nameof(AnalysisLaunchContext)}]")
                     .AppendLine($"ShowAnalysisWindow: '{ShowAnalysisWindow.ToString()}'")
                     .AppendLine($"MaxDegreeOfParallelism: '{MaxDegreeOfParallelism.ToString()}'")
                     .AppendLine($"ShowResults: '{ShowResults.ToString()}'");

            return(sb.ToString());
        }
Esempio n. 2
0
        public Orchestrator()
        {
            _maxDegreeOfParallelism = new MaxDegreeOfParallelism(Environment.ProcessorCount / 2, 2);
            _workingDirectory       = UserConfig.workingDirectory;
            _logFile      = UserConfig.logFile;
            _sectionTitle = "Chromosome";

            int32Comparer    = new Int32Comparer();
            samplesHashtable = new Dictionary <int, uint>();
            _stopWatch       = new Stopwatch();
            _parserSTW       = new Stopwatch();
            _commitSTW       = new Stopwatch();
            _indexSTW        = new Stopwatch();

            _cacheOptions = new CacheOptions(
                CacheMaximumHistory: UserConfig.maxCacheSize, //163840,//81920,
                CacheMinimumHistory: UserConfig.minCacheSize, //20240,
                CacheKeepAliveTimeOut: 600000,
                CachePolicy: CSharpTest.Net.Collections.CachePolicy.Recent);

            di4B = new Di4B <int, Peak, PeakData>(_workingDirectory, _sectionTitle, UserConfig.memory, HDDPerformance.Fastest, UserConfig.indexType, _cacheOptions, PrimitiveSerializer.Int32, int32Comparer);
        }
Esempio n. 3
0
        private bool SetPD(string[] args)
        {
            int chrDP = 0, di4DP = 0;

            if (args.Length != 3 || !int.TryParse(args[1], out chrDP) || !int.TryParse(args[2], out di4DP))
            {
                Herald.Announce(Herald.MessageType.Error, "Invalid arguments");
                return(false);
            }
            if (chrDP == 0)
            {
                Herald.Announce(Herald.MessageType.Error, "Invalid arguments; at least one thread for Chr level is required.");
                return(false);
            }
            if (di4DP == 0)
            {
                Herald.Announce(Herald.MessageType.Error, "Invalid arguments; at least one thread for Di4 level is required.");
                return(false);
            }

            _maxDegreeOfParallelism = new MaxDegreeOfParallelism(chrDP, di4DP);
            return(GetPD());
        }
Esempio n. 4
0
 private bool CanExecute()
 {
     return
         (MaxDegreeOfParallelism.Equals(DegreeOfParallelism.Unlimited) ||
          Count < MaxDegreeOfParallelism);
 }