зеркало из https://github.com/github/vitess-gh.git
Formatting tweaks
This commit is contained in:
Родитель
836aa3174e
Коммит
04325bae34
|
@ -211,14 +211,12 @@ func (txc *TxConnection) discard(conclusion string) {
|
|||
TxLogger.Send(txc)
|
||||
}
|
||||
|
||||
const txTimeLayout = "2006-01-02 15:04:05.9999"
|
||||
|
||||
func (txc *TxConnection) Format(params url.Values) string {
|
||||
return fmt.Sprintf(
|
||||
"%v\t%v\t%v\t%.6f\t%v\t%v\t\n",
|
||||
txc.transactionId,
|
||||
txc.startTime.Format(txTimeLayout),
|
||||
txc.endTime.Format(txTimeLayout),
|
||||
txc.startTime.Format(time.StampMicro),
|
||||
txc.endTime.Format(time.StampMicro),
|
||||
txc.endTime.Sub(txc.startTime).Seconds(),
|
||||
txc.conclusion,
|
||||
strings.Join(txc.queries, ";"),
|
||||
|
|
|
@ -115,7 +115,7 @@ func queryLogzHandler(w http.ResponseWriter, r *http.Request) {
|
|||
Value.MySQL = strs[12]
|
||||
Value.Conn = strs[13]
|
||||
Value.PlanType = strs[6]
|
||||
Value.Sql = strs[7]
|
||||
Value.Sql = strings.Trim(strs[7], "\"")
|
||||
Value.Queries = strs[9]
|
||||
Value.Sources = strs[11]
|
||||
Value.Rows = strs[14]
|
||||
|
|
|
@ -155,8 +155,8 @@ func (log *sqlQueryStats) Format(params url.Values) string {
|
|||
log.Method,
|
||||
log.RemoteAddr(),
|
||||
log.Username(),
|
||||
log.StartTime,
|
||||
log.EndTime,
|
||||
log.StartTime.Format(time.StampMicro),
|
||||
log.EndTime.Format(time.StampMicro),
|
||||
log.TotalTime().Seconds(),
|
||||
log.PlanType,
|
||||
log.OriginalSql,
|
||||
|
|
Загрузка…
Ссылка в новой задаче