mirror of
https://github.com/zr-hebo/sniffer-agent.git
synced 2025-09-19 02:06:52 +08:00
reduce buffer pool size
This commit is contained in:
@@ -15,7 +15,7 @@ type sliceBufferPool struct {
|
|||||||
|
|
||||||
func NewSliceBufferPool(name string, bufferSize int) (sbp *sliceBufferPool) {
|
func NewSliceBufferPool(name string, bufferSize int) (sbp *sliceBufferPool) {
|
||||||
return &sliceBufferPool{
|
return &sliceBufferPool{
|
||||||
queue: make(chan []byte, 512),
|
queue: make(chan []byte, 256),
|
||||||
bufferSize: bufferSize,
|
bufferSize: bufferSize,
|
||||||
name: name,
|
name: name,
|
||||||
}
|
}
|
||||||
|
@@ -34,7 +34,7 @@ const (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
mqpp = NewMysqlQueryPiecePool()
|
mqpp = NewMysqlQueryPiecePool()
|
||||||
localSliceBufferPool = NewSliceBufferPool("json cache", 2*1024*1024)
|
localSliceBufferPool = NewSliceBufferPool("json cache", 1*1024*1024)
|
||||||
)
|
)
|
||||||
|
|
||||||
var commonBaseQueryPiece = &BaseQueryPiece{}
|
var commonBaseQueryPiece = &BaseQueryPiece{}
|
||||||
|
@@ -96,7 +96,7 @@ const (
|
|||||||
// See https://dev.mysql.com/doc/refman/5.7/en/identifiers.html
|
// See https://dev.mysql.com/doc/refman/5.7/en/identifiers.html
|
||||||
const (
|
const (
|
||||||
// MaxMysqlPacketLen is the max packet payload length.
|
// MaxMysqlPacketLen is the max packet payload length.
|
||||||
MaxMysqlPacketLen = 1 * 1024 * 1024
|
MaxMysqlPacketLen = 512 * 1024
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
Reference in New Issue
Block a user