Documentation
¶
Overview ¶
Package config provides configuration management for Gorilla DataFrame operations
Index ¶
Constants ¶
const ( DefaultParallelThreshold = 1000 DefaultMaxParallelism = 16 DefaultGCPressureThreshold = 0.8 DefaultAllocatorPoolSize = 10 // Performance tuning constants SmallDatasetThreshold = 100 LargeDatasetThreshold = 1000000 LargeDatasetParallelThreshold = 500 HighColumnCountThreshold = 50 LowColumnCountThreshold = 5 SmallChunkSize = 100 LargeChunkSize = 2000 WorkerPoolReductionFactor = 2 )
Default configuration values
Variables ¶
This section is empty.
Functions ¶
func SetGlobalConfig ¶
func SetGlobalConfig(config Config)
SetGlobalConfig sets the global configuration
Types ¶
type Config ¶
type Config struct {
// Parallel Processing Configuration
// Minimum rows to trigger parallel processing
ParallelThreshold int `json:"parallel_threshold" yaml:"parallel_threshold"`
// Number of worker goroutines (0 = auto-detect)
WorkerPoolSize int `json:"worker_pool_size" yaml:"worker_pool_size"`
// Size of data chunks for parallel processing (0 = auto-calculate)
ChunkSize int `json:"chunk_size" yaml:"chunk_size"`
MaxParallelism int `json:"max_parallelism" yaml:"max_parallelism"` // Maximum number of parallel operations
// Memory Management Configuration
// Memory threshold in bytes (0 = unlimited)
MemoryThreshold int64 `json:"memory_threshold" yaml:"memory_threshold"`
// GC pressure threshold (0.0-1.0)
GCPressureThreshold float64 `json:"gc_pressure_threshold" yaml:"gc_pressure_threshold"`
AllocatorPoolSize int `json:"allocator_pool_size" yaml:"allocator_pool_size"` // Size of allocator pool
// Query Optimization Configuration
FilterFusion bool `json:"filter_fusion" yaml:"filter_fusion"` // Enable filter fusion optimization
PredicatePushdown bool `json:"predicate_pushdown" yaml:"predicate_pushdown"` // Enable predicate pushdown optimization
JoinOptimization bool `json:"join_optimization" yaml:"join_optimization"` // Enable join optimization
// Debugging Configuration
EnableProfiling bool `json:"enable_profiling" yaml:"enable_profiling"` // Enable performance profiling
VerboseLogging bool `json:"verbose_logging" yaml:"verbose_logging"` // Enable verbose logging
MetricsCollection bool `json:"metrics_collection" yaml:"metrics_collection"` // Enable metrics collection
}
Config represents the global configuration for Gorilla DataFrame operations
func GetGlobalConfig ¶
func GetGlobalConfig() Config
GetGlobalConfig returns the current global configuration
func LoadFromEnv ¶
func LoadFromEnv() Config
LoadFromEnv loads configuration from environment variables
func LoadFromFile ¶
LoadFromFile loads configuration from a file (supports JSON, YAML)
func LoadFromJSON ¶
LoadFromJSON loads configuration from JSON data
func (Config) WithDefaults ¶
WithDefaults returns a new configuration with default values filled in for zero values
type ConfigValidator ¶
type ConfigValidator struct {
// contains filtered or unexported fields
}
ConfigValidator validates and provides recommendations for configuration
func NewConfigValidator ¶
func NewConfigValidator() *ConfigValidator
NewConfigValidator creates a new configuration validator
type OperationConfig ¶
type OperationConfig struct {
ForceParallel bool // Force parallel execution regardless of threshold
DisableParallel bool // Disable parallel execution
CustomChunkSize int // Custom chunk size for this operation
MaxMemoryUsage int64 // Maximum memory usage for this operation
}
OperationConfig represents per-operation configuration overrides
type PerformanceTuner ¶
type PerformanceTuner struct {
// contains filtered or unexported fields
}
PerformanceTuner provides dynamic performance tuning based on runtime conditions
func NewPerformanceTuner ¶
func NewPerformanceTuner(config *Config) *PerformanceTuner
NewPerformanceTuner creates a new performance tuner
func (*PerformanceTuner) OptimizeForDataset ¶
func (pt *PerformanceTuner) OptimizeForDataset(rowCount, columnCount int) Config
OptimizeForDataset optimizes configuration for a specific dataset
type SystemInfo ¶
SystemInfo contains system information for configuration validation
func GetSystemInfo ¶
func GetSystemInfo() SystemInfo
GetSystemInfo returns system information for configuration validation