Update metrics tracking and enhance cache eviction strategies
Release Tag / release (push) Successful in 34s
Release Tag / release (push) Successful in 34s
- Added metrics for bytes saved from cache to improve performance insights. - Updated cache eviction strategies in MemoryFS and DiskFS to include metrics tracking for hits and evictions. - Enhanced README.md with updated garbage collection algorithm descriptions and recommendations for cache usage. - Introduced new madviseSequential functionality for improved memory access hints on Unix systems. - Adjusted validation configuration in examples to better reflect realistic usage scenarios.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
//go:build !windows
|
||||
|
||||
package disk
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
// madviseSequential gives the OS a hint that the memory region will be
|
||||
// accessed sequentially. This is a no-op or best-effort on some platforms.
|
||||
func madviseSequential(b []byte) error {
|
||||
return unix.Madvise(b, unix.MADV_SEQUENTIAL)
|
||||
}
|
||||
Reference in New Issue
Block a user