Interim release: documentation updates and rate limiting improvements
- Add applesauce library reference documentation - Add rate limiting test report for Badger - Add memory monitoring for rate limiter (platform-specific implementations) - Enhance PID-controlled adaptive rate limiting - Update Neo4j and Badger monitors with improved load metrics - Add docker-compose configuration - Update README and configuration options 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit was merged in pull request #3.
This commit is contained in:
15
pkg/ratelimit/memory_other.go
Normal file
15
pkg/ratelimit/memory_other.go
Normal file
@@ -0,0 +1,15 @@
|
||||
//go:build !linux && !(js && wasm)
|
||||
|
||||
package ratelimit
|
||||
|
||||
// ReadProcessMemoryStats returns memory statistics using Go runtime stats.
|
||||
// On non-Linux platforms, we cannot read /proc/self/status, so we approximate
|
||||
// using the Go runtime's memory statistics.
|
||||
//
|
||||
// Note: This is less accurate than the Linux implementation because:
|
||||
// - runtime.MemStats.Sys includes memory reserved but not necessarily resident
|
||||
// - We cannot distinguish shared vs anonymous memory
|
||||
// - The values may not match what the OS reports for the process
|
||||
func ReadProcessMemoryStats() ProcessMemoryStats {
|
||||
return readProcessMemoryStatsFallback()
|
||||
}
|
||||
Reference in New Issue
Block a user