mirror of
https://github.com/zr-hebo/sniffer-agent.git
synced 2025-08-11 13:38:56 +08:00
优化抓包性能
This commit is contained in:
@@ -7,8 +7,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
uselessSQLPattern = regexp.MustCompile(`(?i)^\s*(select 1|select @@version_comment limit 1|`+
|
||||
`SELECT user, db FROM information_schema.processlist WHERE host=|commit|begin)`)
|
||||
uselessSQLPattern = regexp.MustCompile(`(?i)^\s*(select 1|select @@version_comment limit 1|commit|begin)`)
|
||||
ddlPatern = regexp.MustCompile(`(?i)^\s*(create|alter|drop)`)
|
||||
)
|
||||
|
||||
|
@@ -164,7 +164,6 @@ func filterQueryPieceBySQL(mqp *model.PooledMysqlQueryPiece, querySQL []byte) (m
|
||||
|
||||
} else if (uselessSQLPattern.Match(querySQL)) {
|
||||
return nil
|
||||
|
||||
}
|
||||
|
||||
if ddlPatern.Match(querySQL) {
|
||||
|
Reference in New Issue
Block a user