mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-23 08:48:32 +02:00
refactor(misc): enhance performance on bytes pool, entrypoint, access log and route context handling
- Introduced benchmark tests for Entrypoint and ReverseProxy to evaluate performance. - Updated Entrypoint's ServeHTTP method to improve route context management. - Added new test file for entrypoint benchmarks and refined existing tests for route handling.
This commit is contained in:
@@ -76,7 +76,7 @@ const (
|
||||
errBurst = 5
|
||||
)
|
||||
|
||||
var lineBufPool = synk.GetBytesPool()
|
||||
var lineBufPool = synk.GetBytesPoolWithUniqueMemory()
|
||||
|
||||
func NewAccessLogger(parent task.Parent, cfg AnyConfig) (*AccessLogger, error) {
|
||||
io, err := cfg.IO()
|
||||
|
||||
@@ -66,7 +66,7 @@ type lineInfo struct {
|
||||
Size int64 // Size of this line
|
||||
}
|
||||
|
||||
var rotateBytePool = synk.GetBytesPool()
|
||||
var rotateBytePool = synk.GetBytesPoolWithUniqueMemory()
|
||||
|
||||
// rotateLogFile rotates the log file based on the retention policy.
|
||||
// It returns the result of the rotation and an error if any.
|
||||
|
||||
Reference in New Issue
Block a user