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

disable CGO #318

Merged
merged 2 commits into from
Oct 7, 2022
Merged

disable CGO #318

merged 2 commits into from
Oct 7, 2022

Conversation

mariomac
Copy link

CGO it's not required and usually makes executables more resource-consuming. It also adds some extra requirements to the build/test pipeline (e.g. having to have GCC + libraries, etc...)

Reference read: https://dave.cheney.net/2016/01/18/cgo-is-not-go

@codecov-commenter
Copy link

codecov-commenter commented Oct 3, 2022

Codecov Report

Merging #318 (0c89d00) into main (8cc4bc7) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #318   +/-   ##
=======================================
  Coverage   68.89%   68.89%           
=======================================
  Files          84       84           
  Lines        4900     4900           
=======================================
  Hits         3376     3376           
  Misses       1308     1308           
  Partials      216      216           
Flag Coverage Δ
unittests 68.89% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Collaborator

@ronensc ronensc left a comment

Choose a reason for hiding this comment

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

@mariomac thanks for the reference
@KalmanMeth @eranra do you know why CGO_ENABLED=1 was introduced in the first place?

@KalmanMeth
Copy link
Collaborator

@ronensc Probably as @mariomac wrote, it is needed for -race.

@mariomac
Copy link
Author

mariomac commented Oct 7, 2022

Yes, it was needed for -race (didn't know that) so I put it directly in the tests.

However I'm doing few more tests before merging. Despite everybody saying CGo is slower than Go in the internet, I noticed a minor increase in the CPU&Memory consumption 🤷🏻‍♂️

@mariomac mariomac merged commit d377c5d into netobserv:main Oct 7, 2022
@mariomac mariomac deleted the cgo branch October 7, 2022 14:51
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