{"modulePath":"github.com/MAX-API-Next/MAX-API","version":"v1.0.5","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package performance_setting\n\n## Functions\n\n```go\nfunc GetCacheStats() common.DiskCacheStats\n```\nGetCacheStats 获取缓存统计信息（代理到 common 包）\n\n```go\nfunc ResetStats()\n```\nResetStats 重置统计信息\n\n```go\nfunc UpdateAndSync()\n```\nUpdateAndSync 更新配置并同步到 common 包 当配置从数据库加载后，需要调用此函数同步\n\n## Types\n\n```go\ntype PerformanceSetting struct {\n\t// DiskCacheEnabled 是否启用磁盘缓存（磁盘换内存）\n\tDiskCacheEnabled bool `json:\"disk_cache_enabled\"`\n\t// DiskCacheThresholdMB 触发磁盘缓存的请求体大小阈值（MB）\n\tDiskCacheThresholdMB int `json:\"disk_cache_threshold_mb\"`\n\t// DiskCacheMaxSizeMB 磁盘缓存最大总大小（MB）\n\tDiskCacheMaxSizeMB int `json:\"disk_cache_max_size_mb\"`\n\t// DiskCachePath 磁盘缓存目录\n\tDiskCachePath string `json:\"disk_cache_path\"`\n\n\t// MonitorEnabled 是否启用性能监控\n\tMonitorEnabled bool `json:\"monitor_enabled\"`\n\t// MonitorCPUThreshold CPU 使用率阈值（%）\n\tMonitorCPUThreshold int `json:\"monitor_cpu_threshold\"`\n\t// MonitorMemoryThreshold 内存使用率阈值（%）\n\tMonitorMemoryThreshold int `json:\"monitor_memory_threshold\"`\n\t// MonitorDiskThreshold 磁盘使用率阈值（%）\n\tMonitorDiskThreshold int `json:\"monitor_disk_threshold\"`\n}\n```\nPerformanceSetting 性能设置配置\n\n```go\nfunc GetPerformanceSetting() *PerformanceSetting\n```\nGetPerformanceSetting 获取性能设置\n\n","path":"github.com/MAX-API-Next/MAX-API/setting/performance_setting","name":"performance_setting","synopsis":"","isRedistributable":true}
