change begin time to timestamp

This commit is contained in:
hebo
2019-08-23 15:36:57 +08:00
parent 29abb4a212
commit 18845f8278
2 changed files with 4 additions and 4 deletions

View File

@@ -27,7 +27,7 @@ type MysqlQueryPiece struct {
VisitUser *string `json:"user"`
VisitDB *string `json:"db"`
QuerySQL *string `json:"sql"`
BeginTime string `json:"bt"`
BeginTime int64 `json:"bt"`
CostTimeInMS int64 `json:"cms"`
}
@@ -66,7 +66,7 @@ func NewPooledMysqlQueryPiece(
mqp.VisitUser = visitUser
mqp.VisitDB = visitDB
mqp.SyncSend = false
mqp.BeginTime = time.Unix(stmtBeginTime/1000, 0).Format(datetimeFormat)
mqp.BeginTime = stmtBeginTime
mqp.CostTimeInMS = nowInMS - stmtBeginTime
mqp.recoverPool = mqpp