From 7e388eeeef63c3cd38996f30f2373aa09abf62a0 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 23 Jul 2024 16:20:45 +0800 Subject: [PATCH] 1 --- dbpool.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dbpool.go b/dbpool.go index 5a3f8f7..ddcb364 100644 --- a/dbpool.go +++ b/dbpool.go @@ -27,6 +27,7 @@ type dataSource struct { type maxIdxMonitorProgItem struct { execTimes int64 + okTimes int64 errTimes int64 abortTimes int64 lastIdx *int64 @@ -63,13 +64,14 @@ func (this *dbPool) outputMonitorLog() { GetSysLog().Info("--------------------------------------------------------------------------------------") this.maxIdxMonitorProgHash.Range(func (k string, ele *maxIdxMonitorProg) bool { ele.itemHash.Range(func (k1 string, ele2 *maxIdxMonitorProgItem) bool { - GetSysLog().Info("%s.%s.%s maxIdx:%d lastIdx:%d exec:%d err:%d abort:%d", + GetSysLog().Info("%s.%s.%s maxIdx:%d lastIdx:%d exec:%d ok:%d err:%d abort:%d", ele.dataSource, ele.tblName, k1, *ele.maxIdx, *ele2.lastIdx, ele2.execTimes, + ele2.okTimes, ele2.errTimes, ele2.abortTimes) return true @@ -330,6 +332,7 @@ func (this *dbPool) IncrementLoad( item.abortTimes += 1 return } + item.okTimes += 1 if idx > lastIdx { lastIdx = idx } else {