зеркало из https://github.com/github/vitess-gh.git
Use fractional seconds uniformly in the stream log.
This commit is contained in:
Родитель
cc3c447603
Коммит
86332ed4bb
|
@ -149,20 +149,21 @@ func (log sqlQueryStats) Username() string {
|
|||
func (log sqlQueryStats) Format(params url.Values) string {
|
||||
_, fullBindParams := params["full"]
|
||||
return fmt.Sprintf(
|
||||
"%v\t%v\t%v\t%v\t%v\t%v\t%v\t%q\t%v\t%v\t%q\t%v\t%v\t%v\t%v\t%v\t%v\t%v\t",
|
||||
"%v\t%v\t%v\t%v\t%v\t%v\t%v\t%q\t%v\t%v\t%q\t%v\t%v\t%v\t%v\t%v\t%v\t%v\t%v\t",
|
||||
log.Method,
|
||||
log.RemoteAddr(),
|
||||
log.Username(),
|
||||
log.StartTime,
|
||||
log.EndTime,
|
||||
log.TotalTime(),
|
||||
log.TotalTime().Seconds(),
|
||||
log.PlanType,
|
||||
log.OriginalSql,
|
||||
log.FmtBindVariables(fullBindParams),
|
||||
log.NumberOfQueries,
|
||||
log.RewrittenSql(),
|
||||
log.FmtQuerySources(),
|
||||
log.MysqlResponseTime,
|
||||
log.MysqlResponseTime.Seconds(),
|
||||
log.WaitingForConnection.Seconds(),
|
||||
log.SizeOfResponse(),
|
||||
log.CacheHits,
|
||||
log.CacheMisses,
|
||||
|
|
|
@ -27,13 +27,14 @@ class Log(object):
|
|||
self.rewritten_sql,
|
||||
self.query_sources,
|
||||
self.mysql_response_time,
|
||||
self.waiting_for_connection_time,
|
||||
self.size_of_response,
|
||||
self.cache_hits,
|
||||
self.cache_misses,
|
||||
self.cache_absent,
|
||||
self.cache_invalidations) = line.strip().split('\t')
|
||||
except ValueError:
|
||||
print "Wrong looking line: %r"
|
||||
print "Wrong looking line: %r" % line
|
||||
raise
|
||||
|
||||
def check(self, case):
|
||||
|
|
Загрузка…
Ссылка в новой задаче