This is an automated email from the ASF dual-hosted git repository.

liuhan pushed a commit to branch tmp_disable_reading
in repository https://gitbox.apache.org/repos/asf/skywalking-rover.git


The following commit(s) were added to refs/heads/tmp_disable_reading by this 
push:
     new 37cba8e  add test log
37cba8e is described below

commit 37cba8e0e4779161335fc943e6f574a4a06a5982
Author: mrproliu <[email protected]>
AuthorDate: Thu Dec 19 19:19:21 2024 +0800

    add test log
---
 pkg/accesslog/collector/protocols/queue.go | 9 ++-------
 pkg/tools/btf/queue.go                     | 6 ++++++
 pkg/tools/buffer/buffer.go                 | 1 -
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/pkg/accesslog/collector/protocols/queue.go 
b/pkg/accesslog/collector/protocols/queue.go
index bfafd07..21817fc 100644
--- a/pkg/accesslog/collector/protocols/queue.go
+++ b/pkg/accesslog/collector/protocols/queue.go
@@ -241,7 +241,7 @@ func (p *PartitionContext) Consume(data interface{}) {
                                status = 2
                        }
                }
-               log.Infof("receive the socket data event, connection ID: %d, 
random ID: %d, pid: %d, prev data id: %d, "+
+               log.Debugf("receive the socket data event, connection ID: %d, 
random ID: %d, pid: %d, prev data id: %d, "+
                        "data id: %d, sequence: %d, protocol: %d, http1 type: 
%d",
                        event.ConnectionID, event.RandomID, pid, 
event.PrevDataID0, event.DataID0, event.Sequence0, event.Protocol0, status)
                connection := p.getConnectionContext(event.ConnectionID, 
event.RandomID, event.Protocol0, event.DataID0, 2)
@@ -263,9 +263,6 @@ func (p *PartitionContext) 
getConnectionContext(connectionID, randomID uint64,
        }
        result := newPartitionConnection(p.protocolMgr, connectionID, randomID, 
protocol, currentDataID)
        p.connections.Set(conKey, result)
-       log.Infof("create the new connection context, connection ID: %d, random 
ID: %d, partition number: %d, "+
-               "protoocl: %d, current data ID: %d, partition context: %p",
-               connectionID, randomID, p.partitionNum, protocol, 
currentDataID, p)
        return result
 }
 
@@ -302,7 +299,7 @@ func (p *PartitionContext) processEvents() {
                                info.closeCallback()
                        }
                        closedConnections = append(closedConnections, conKey)
-                       log.Infof("detect the connection is already closed, 
then notify to the callback, connection ID: %d, random ID: %d, partition 
number: %d",
+                       log.Debugf("detect the connection is already closed, 
then notify to the callback, connection ID: %d, random ID: %d, partition 
number: %d",
                                info.connectionID, info.randomID, 
p.partitionNum)
                }
        })
@@ -323,8 +320,6 @@ func (p *PartitionContext) 
checkTheConnectionIsAlreadyClose(con *PartitionConnec
        if time.Since(con.lastCheckCloseTime) <= time.Second*30 {
                return
        }
-       log.Infof("checking the connection is closed or not, connection ID: %d, 
random ID: %d, current: %s, last check: %s",
-               con.connectionID, con.randomID, timeToStr(time.Now()), 
timeToStr(con.lastCheckCloseTime))
        con.lastCheckCloseTime = time.Now()
        var activateConn common.ActiveConnection
        if err := p.context.BPF.ActiveConnectionMap.Lookup(con.connectionID, 
&activateConn); err != nil {
diff --git a/pkg/tools/btf/queue.go b/pkg/tools/btf/queue.go
index a3622c2..c02de3f 100644
--- a/pkg/tools/btf/queue.go
+++ b/pkg/tools/btf/queue.go
@@ -225,11 +225,17 @@ func (e *EventQueue) start0(ctx context.Context, linker 
*Linker) {
                go func(ctx context.Context, inx int) {
                        p := e.partitions[inx]
                        p.ctx.Start(ctx)
+                       var t = 0
                        for {
                                select {
                                // consume the data
                                case data := <-p.channel:
                                        p.ctx.Consume(data)
+                                       t++
+                                       if t%1000 == 0 {
+                                               log.Infof("reducing count in 
partion: %d, %d", p.index, len(p.channel))
+                                               t = 0
+                                       }
                                // shutdown the consumer
                                case <-ctx.Done():
                                        return
diff --git a/pkg/tools/buffer/buffer.go b/pkg/tools/buffer/buffer.go
index 1536905..adf35ff 100644
--- a/pkg/tools/buffer/buffer.go
+++ b/pkg/tools/buffer/buffer.go
@@ -628,7 +628,6 @@ func (r *Buffer) PrepareForReading() bool {
        if r.shouldResetPosition {
                r.ResetForLoopReading()
                r.shouldResetPosition = false
-               log.Infof("should reset the buffer position, ref: %p", r)
                return false
        }
        if r.head == nil || r.head.element == nil {

Reply via email to