Skip to content

Commit 60846c1

Browse files
author
奇淼(piexlmax
authored
Merge pull request #36 from piexlmax/main
fixed:change FMT function
2 parents 243f1ce + 5ac1f76 commit 60846c1

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

api/engine.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ func Limit() map[string]string {
4545
for _, v := range errs {
4646
fmt.Println(v)
4747
}
48+
return limit
4849
}
4950
if resp.StatusCode == 200 {
5051
var res response.LimitRes

core/grpc/newServer/replacement.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ func interceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInf
5252
id := utils.CatGoroutineID()
5353
request.FmtHookPool(request.PoolReq{
5454
Reqs: request.Collect(req),
55+
Args: request.Collect(req),
5556
Source: true,
5657
OriginClassName: "grpc",
5758
MethodName: "NewServer",

model/request/engine.go

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,15 @@ type Detail struct {
5353
}
5454

5555
type Pant struct {
56-
Disk string `json:"disk"`
57-
Memory string `json:"memory"`
58-
Cpu string `json:"cpu"`
59-
MethodQueue int `json:"methodQueue"`
60-
ReplayQueue int `json:"replayQueue"`
61-
ReqCount int `json:"reqCount"`
62-
ReportQueue int `json:"reportQueue"`
56+
Disk string `json:"disk"`
57+
Memory string `json:"memory"`
58+
Cpu string `json:"cpu"`
59+
MethodQueue int `json:"methodQueue"`
60+
ReplayQueue int `json:"replayQueue"`
61+
ReqCount int `json:"reqCount"`
62+
ReportQueue int `json:"reportQueue"`
63+
IsCoreInstalled int `json:"isCoreInstalled"`
64+
IsCoreRunning int `json:"isCoreRunning"`
6365
}
6466

6567
type Component struct {
@@ -159,7 +161,9 @@ func (p *PoolTree) IsThisBegin(GoroutineID string) bool {
159161

160162
func (p *PoolTree) FMT(pools *[]Pool, w *utils.Worker, goroutineIDs map[string]bool, TraceId string) {
161163
p.Pool.InvokeId = int(w.GetId())
162-
p.Pool.TraceId = TraceId
164+
if(p.Pool.ClassName == "grpc.(*ClientConn)"){
165+
p.Pool.TraceId = TraceId
166+
}
163167
*pools = append(*pools, *p.Pool)
164168
goroutineIDs[p.GoroutineID] = true
165169
fmt.Println(p.Pool.ClassName, p.Pool.MethodName)

service/engine.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,8 @@ func PingPang() {
262262
req.Detail.Pant.Disk = "{}"
263263
req.Detail.Pant.Cpu = string(cpuByte)
264264
req.Detail.Pant.Memory = string(memoryByte)
265+
req.Detail.Pant.IsCoreRunning = 1
266+
req.Detail.Pant.IsCoreInstalled = 1
265267
req.Detail.AgentId = global.AgentId
266268
api.ReportUpload(req)
267269
}

0 commit comments

Comments
 (0)