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 3302d82 remove log
3302d82 is described below
commit 3302d8257f33c2095e379b1b021bed6e34e0689b
Author: mrproliu <[email protected]>
AuthorDate: Sat Dec 21 20:50:03 2024 +0800
remove log
---
pkg/tools/btf/queue.go | 19 -------------------
1 file changed, 19 deletions(-)
diff --git a/pkg/tools/btf/queue.go b/pkg/tools/btf/queue.go
index 58aaba5..3846b29 100644
--- a/pkg/tools/btf/queue.go
+++ b/pkg/tools/btf/queue.go
@@ -24,8 +24,6 @@ import (
"os"
"strings"
"sync"
- "sync/atomic"
- "time"
"github.com/cilium/ebpf"
"github.com/cilium/ebpf/perf"
@@ -177,19 +175,6 @@ func NewEventQueue(partitionCount, sizePerPartition int,
contextGenerator func(p
for i := 0; i < partitionCount; i++ {
partitions = append(partitions, newPartition(i,
sizePerPartition, contextGenerator(i)))
}
-
- go func() {
- ticker := time.NewTicker(time.Second * 5)
- for {
- select {
- case <-ticker.C:
- for _, p := range partitions {
- log.Infof("+++partition %d, count: %d",
p.index, atomic.LoadInt64(p.count))
- atomic.StoreInt64(p.count, 0)
- }
- }
- }
- }()
return &EventQueue{count: partitionCount, partitions: partitions}
}
@@ -218,7 +203,6 @@ func (e *EventQueue) Push(key string, data interface{}) {
// append data
e.partitions[sum32%e.count].channel <- data
- atomic.AddInt64(e.partitions[sum32%e.count].count, 1)
}
func (e *EventQueue) PartitionContexts() []PartitionContext {
@@ -271,15 +255,12 @@ type partition struct {
index int
channel chan interface{}
ctx PartitionContext
- count *int64
}
func newPartition(index, size int, ctx PartitionContext) *partition {
- i := int64(0)
return &partition{
index: index,
channel: make(chan interface{}, size),
ctx: ctx,
- count: &i,
}
}