コード例 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @BeforeClass public static void setUpFeatureToggles()
        public static void SetUpFeatureToggles()
        {
            // Configure populator so that it will use block-based population and reduce batch size and increase number of workers
            // so that population will very likely create more batches in more threads (affecting number of buffers used)
            FeatureToggles.set(typeof(GenericNativeIndexPopulator), BLOCK_BASED_POPULATION_NAME, true);
            FeatureToggles.set(typeof(BlockBasedIndexPopulator), BLOCK_SIZE_NAME, _testBlockSize);
        }
コード例 #2
0
        // The single-threaded setting makes the test deterministic. The multi-threaded variant has the same problem tested below.

//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setFeatureToggle()
        public void setFeatureToggle()
        {
            // let our populator have fine-grained insight into updates coming in
            FeatureToggles.set(typeof(MultipleIndexPopulator), BATCH_SIZE_NAME, 1);
            FeatureToggles.set(typeof(BatchingMultipleIndexPopulator), BATCH_SIZE_NAME, 1);
            FeatureToggles.set(typeof(MultipleIndexPopulator), QUEUE_THRESHOLD_NAME, 1);
            FeatureToggles.set(typeof(BatchingMultipleIndexPopulator), QUEUE_THRESHOLD_NAME, 1);
        }
コード例 #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldPopulateMultipleIndexPopulatorsUnderStressMultiThreaded() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldPopulateMultipleIndexPopulatorsUnderStressMultiThreaded()
        {
            int concurrentUpdatesQueueFlushThreshold = _random.Next(100, 5000);

            FeatureToggles.set(typeof(BatchingMultipleIndexPopulator), BatchingMultipleIndexPopulator.QUEUE_THRESHOLD_NAME, concurrentUpdatesQueueFlushThreshold);
            try
            {
                ReadConfigAndRunTest(true);
            }
            finally
            {
                FeatureToggles.clear(typeof(BatchingMultipleIndexPopulator), BatchingMultipleIndexPopulator.QUEUE_THRESHOLD_NAME);
            }
        }
コード例 #4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void before()
        public virtual void Before()
        {
            DbRule.withSetting(GraphDatabaseSettings.multi_threaded_schema_index_population_enabled, MultiThreadedPopulationEnabled + "");

            int batchSize = Random.Next(1, 5);

            FeatureToggles.set(typeof(MultipleIndexPopulator), MultipleIndexPopulator.QUEUE_THRESHOLD_NAME, batchSize);
            FeatureToggles.set(typeof(BatchingMultipleIndexPopulator), MultipleIndexPopulator.QUEUE_THRESHOLD_NAME, batchSize);
            FeatureToggles.set(typeof(MultipleIndexPopulator), "print_debug", true);

            GraphDatabaseAPI graphDatabaseAPI = DbRule.GraphDatabaseAPI;

            this._db = graphDatabaseAPI;
            DependencyResolver dependencyResolver = graphDatabaseAPI.DependencyResolver;

            this._bridge = dependencyResolver.ResolveDependency(typeof(ThreadToStatementContextBridge));
            graphDatabaseAPI.DependencyResolver.resolveDependency(typeof(Monitors)).addMonitorListener(_indexOnlineMonitor);
        }
コード例 #5
0
 private static void SetProperty(string name, int value)
 {
     FeatureToggles.set(typeof(BatchingMultipleIndexPopulator), name, value);
 }