Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update: use cgo instead of uds #264

Merged
merged 13 commits into from
Jun 27, 2022
Merged

Conversation

jundizhou
Copy link
Collaborator

@jundizhou jundizhou commented Jun 23, 2022

Description

probe:
Sending data using CGO mode
Update struct of kindlingEvent
Remove probe Dockerfile
Remove probe compiler's scripts
Use cmake instead of bazel

collector:
Receiver data using CGO mode
Update Dockerfile
Update compiler scripts

How Has This Been Tested?

recompiler and test all

for issue #265

sanyangji and others added 8 commits June 7, 2022 11:24
Signed-off-by: sangyangji <songyujie@zju.edu.cn>
Signed-off-by: jundizhou <jundizhou@harmonycloud.cn>
Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>
convert the cgo event to the KindlingEvent
Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>
using a channel to store the events
Signed-off-by: jundizhou <jundizhou@harmonycloud.cn>
@dxsup dxsup self-requested a review June 24, 2022 03:01
Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>
Comment on lines +80 to +93
func (r *CgoReceiver) printMetrics() {
timer := time.NewTicker(1 * time.Second)
r.shutdownWG.Add(1)
for {
select {
case <-r.stopCh:
r.shutdownWG.Done()
return
case <-timer.C:
r.telemetry.Logger.Info("Total number events received: ", zap.Int("events", r.eventCount))
r.eventCount = 0
r.telemetry.Logger.Info("Current channel size: ", zap.Int("channel size", len(r.eventChannel)))
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was that necessary to print this Metric every second

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I will open another PR to introduce opentelemetry to record metrics.

Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>
Comment on lines 47 to 50
- cat
- /opt/kernel-support
initialDelaySeconds: 5
periodSeconds: 5
- cat
- /opt/kernel-support
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not keep the initialDelaySeconds and periodSeconds?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we should.

Comment on lines +3 to +5
cd probe/build
cmake -DBUILD_DRIVER=OFF -DPROBE_VERSION=0.1.1dev ..
make
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems we have to set the PROBE_VERSION manually.

Copy link
Member

@dxsup dxsup Jun 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There will be another PR to improve it.

Comment on lines 13 to 16
cd ../../collector/
go build
collectorPath="./collector"
if [ ! -f "$collectorPath" ]; then
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need the CodeVersion of the collector either.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the collector-version-build.sh to replace go build

Comment on lines 19 to 21
- name: kindling-probe
image: kindlingproject/kindling-probe:latest
- name: kindling-collector
image: registry.cn-hangzhou.aliyuncs.com/zjd-kindling/zjdkindling:new1
imagePullPolicy: Always
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not use a personal image

Daxin Wang added 3 commits June 27, 2022 17:24
Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>
Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>
Signed-off-by: Daxin Wang <daxinwang@harmonycloud.cn>
@NeJan2020 NeJan2020 self-requested a review June 27, 2022 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants