<commit_before>/*
 * Copyright 1999-2010 <NAME> (l.garulli--at--orientechnologies.com)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.orientechnologies.orient.core.config;

import java.util.Map;
import java.util.Map.Entry;
import java.util.logging.ConsoleHandler;
import java.util.logging.FileHandler;

import com.orientechnologies.common.log.OLogManager;

/**
 * Keeps all configuration settings. At startup assigns the configuration values by reading system properties.
 * 
 * @author <NAME> (l.garulli--at--orientechnologies.com)
 * 
 */
public enum OGlobalConfiguration {
	// LOG
	LOG_CONSOLE_LEVEL("log.console.level", "Console's logging level", String.class, "info", new OConfigurationChangeCallback() {
		public void change(final Object iCurrentValue, final Object iNewValue) {
			OLogManager.instance().setLevel((String) iNewValue, ConsoleHandler.class);
		}
	}), LOG_FILE_LEVEL("log.file.level", "File's logging level", String.class, "fine", new OConfigurationChangeCallback() {
		public void change(final Object iCurrentValue, final Object iNewValue) {
			OLogManager.instance().setLevel((String) iNewValue, FileHandler.class);
		}
	}),

	// STORAGE
	STORAGE_KEEP_OPEN(
			"storage.keepOpen",
			"Tells to the engine to not close the storage when a database is closed. Storages will be closed when the process will shutdown",
			Boolean.class, Boolean.FALSE),

	STORAGE_CACHE_SIZE("storage.cache.size", "Size of the cache that keep the record in memory", Integer.class, 5000),

	// DATABASE
	DB_USE_CACHE("db.cache.enabled", "Uses the storage cache", Boolean.class, true),

	OBJECT_SAVE_ONLY_DIRTY("object.saveOnlyDirty", "Object Database saves only object bound to dirty records", Boolean.class, false),

	// TREEMAP
	MVRBTREE_LAZY_UPDATES("mvrbtree.lazyUpdates", "Configure the TreeMaps (indexes and dictionaries) as buffered or not",
			Integer.class, 300),

	MVRBTREE_NODE_PAGE_SIZE("mvrbtree.nodePageSize",
			"Page size of each single node. 1,024 means that 1,024 entries can be stored inside a node", Float.class, 1024),

	MVRBTREE_LOAD_FACTOR("mvrbtree.loadFactor", "HashMap load factor", Float.class, 0.7f),

	MVRBTREE_OPTIMIZE_THRESHOLD("mvrbtree.optimizeThreshold", "Auto optimize the TreeMap every X operations as get, put and remove",
			Integer.class, 100000),

	MVRBTREE_ENTRYPOINTS("mvrbtree.entryPoints", "Number of entry points to start searching entries", Integer.class, 7),

	MVRBTREE_OPTIMIZE_ENTRYPOINTS_FACTOR("mvrbtree.optimizeEntryPointsFactor",
			"Multiplicand factor to apply to entry-points list (parameter mvrbtree.entrypoints) to determine if needs of optimization",
			Float.class, 1.0f),

	// FILE
	FILE_MMAP_BLOCK_SIZE("file.mmap.blockSize", "Size of the memory mapped block", Integer.class, 300000),

	FILE_MMAP_MAX_MEMORY("file.mmap.maxMemory",
			"Max memory allocable by memory mapping manager. Note that on 32bit OS the limit is to 2Gb but can change to OS by OS",
			Integer.class, 110000000),

	FILE_MMAP_FORCE_DELAY("file.mmap.forceDelay",
			"Delay time in ms to wait for another force flush of the memory mapped block to the disk", Integer.class, 500),

	FILE_MMAP_FORCE_RETRY("file.mmap.forceRetry", "Number of times the memory mapped block will try to flush to the disk",
			Integer.class, 10),
<commit_msg>Increased default number of MVRB+Tree nodes kept in memory<commit_after>/*
 * Copyright 1999-2010 <NAME> (l.garulli--at--orientechnologies.com)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.orientechnologies.orient.core.config;

import java.util.Map;
import java.util.Map.Entry;
import java.util.logging.ConsoleHandler;
import java.util.logging.FileHandler;

import com.orientechnologies.common.log.OLogManager;

/**
 * Keeps all configuration settings. At startup assigns the configuration values by reading system properties.
 * 
 * @author <NAME> (l.garulli--at--orientechnologies.com)
 * 
 */
public enum OGlobalConfiguration {
	// LOG
	LOG_CONSOLE_LEVEL("log.console.level", "Console's logging level", String.class, "info", new OConfigurationChangeCallback() {
		public void change(final Object iCurrentValue, final Object iNewValue) {
			OLogManager.instance().setLevel((String) iNewValue, ConsoleHandler.class);
		}
	}), LOG_FILE_LEVEL("log.file.level", "File's logging level", String.class, "fine", new OConfigurationChangeCallback() {
		public void change(final Object iCurrentValue, final Object iNewValue) {
			OLogManager.instance().setLevel((String) iNewValue, FileHandler.class);
		}
	}),

	// STORAGE
	STORAGE_KEEP_OPEN(
			"storage.keepOpen",
			"Tells to the engine to not close the storage when a database is closed. Storages will be closed when the process will shutdown",
			Boolean.class, Boolean.FALSE),

	STORAGE_CACHE_SIZE("storage.cache.size", "Size of the cache that keep the record in memory", Integer.class, 5000),

	// DATABASE
	DB_USE_CACHE("db.cache.enabled", "Uses the storage cache", Boolean.class, true),

	OBJECT_SAVE_ONLY_DIRTY("object.saveOnlyDirty", "Object Database saves only object bound to dirty records", Boolean.class, false),

	// TREEMAP
	MVRBTREE_LAZY_UPDATES("mvrbtree.lazyUpdates", "Configure the TreeMaps (indexes and dictionaries) as buffered or not",
			Integer.class, 300),

	MVRBTREE_NODE_PAGE_SIZE("mvrbtree.nodePageSize",
			"Page size of each single node. 1,024 means that 1,024 entries can be stored inside a node", Float.class, 1024),

	MVRBTREE_LOAD_FACTOR("mvrbtree.loadFactor", "HashMap load factor", Float.class, 0.7f),

	MVRBTREE_OPTIMIZE_THRESHOLD("mvrbtree.optimizeThreshold", "Auto optimize the TreeMap every X operations as get, put and remove",
			Integer.class, 100000),

	MVRBTREE_ENTRYPOINTS("mvrbtree.entryPoints", "Number of entry points to start searching entries", Integer.class, 9),

	MVRBTREE_OPTIMIZE_ENTRYPOINTS_FACTOR("mvrbtree.optimizeEntryPointsFactor",
			"Multiplicand factor to apply to entry-points list (parameter mvrbtree.entrypoints) to determine if needs of optimization",
			Float.class, 1.0f),

	// FILE
	FILE_MMAP_BLOCK_SIZE("file.mmap.blockSize", "Size of the memory mapped block", Integer.class, 300000),

	FILE_MMAP_MAX_MEMORY("file.mmap.maxMemory",
			"Max memory allocable by memory mapping manager. Note that on 32bit OS the limit is to 2Gb but can change to OS by OS",
			Integer.class, 110000000),

	FILE_MMAP_FORCE_DELAY("file.mmap.forceDelay",
			"Delay time in ms to wait for another force flush of the memory mapped block to the disk", Integer.class, 500),

	FILE_MMAP_FORCE_RETRY("file.mmap.forceRetry", "Number of times the memory mapped block will try to flush to the disk",
			Integer.class, 10),

{'fraction_non_alphanumeric': 0.09875409836065574, 'fraction_numerical': 0.017049180327868854, 'mean_word_length': 4.953161592505855, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3637637', 'n_tokens_mistral': 2503, 'n_tokens_neox': 2283, 'n_words': 756}