Skip to content

Commit

Permalink
增加redis影响行数
Browse files Browse the repository at this point in the history
  • Loading branch information
steden committed Oct 26, 2024
1 parent 8fddf8a commit a1c349d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
9 changes: 6 additions & 3 deletions trace/baseTraceDetail.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ package trace

import (
"fmt"
"github.com/farseer-go/fs/dateTime"
"github.com/farseer-go/fs/path"
"github.com/farseer-go/fs/trace/eumCallType"
"runtime"
"strings"
"time"

"github.com/farseer-go/fs/dateTime"
"github.com/farseer-go/fs/path"
"github.com/farseer-go/fs/trace/eumCallType"
)

// BaseTraceDetail 埋点明细(基类)
Expand Down Expand Up @@ -51,6 +52,8 @@ func (receiver *BaseTraceDetail) SetSql(connectionString string, dbName string,
}
func (receiver *BaseTraceDetail) SetHttpRequest(url string, reqHead map[string]any, rspHead map[string]string, requestBody string, responseBody string, statusCode int) {
}
func (receiver *BaseTraceDetail) SetRows(rows int) {
}

// End 链路明细执行完后,统计用时
func (receiver *BaseTraceDetail) End(err error) {
Expand Down
3 changes: 3 additions & 0 deletions trace/emptyManager.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,6 @@ func (*emptyTraceDetail) SetSql(connectionString string, DbName string, tableNam
}
func (*emptyTraceDetail) SetHttpRequest(url string, reqHead map[string]any, rspHead map[string]string, requestBody string, responseBody string, statusCode int) {
}

func (*emptyTraceDetail) SetRows(rows int) {
}
2 changes: 2 additions & 0 deletions trace/iTraceDetail.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ type ITraceDetail interface {
GetLevel() int
// SetHttpRequest 设置Http请求出入参
SetHttpRequest(url string, reqHead map[string]any, rspHead map[string]string, requestBody string, responseBody string, statusCode int)
// 设置得到的数据量
SetRows(rows int)
}

0 comments on commit a1c349d

Please sign in to comment.