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

Provide slimcap_nomock build tag (and allow feature toggle) #60

Closed
2 tasks done
fako1024 opened this issue Aug 28, 2023 · 0 comments · Fixed by #61
Closed
2 tasks done

Provide slimcap_nomock build tag (and allow feature toggle) #60

fako1024 opened this issue Aug 28, 2023 · 0 comments · Fixed by #61
Assignees
Labels
enhancement New feature or request performance Performance / optimization related topics

Comments

@fako1024
Copy link
Owner

fako1024 commented Aug 28, 2023

In order to support mock tests using stand-in capture sources it was necessary to add some guards against data races in the TPacket access process. Furthermore, socket handling required some additions as well in order to support mocking in the first place. In addition to the increase in complexity these modifications also incur a (granted, small) performance penalty due to the more complex code paths and the atomic nature of some operations not required unless mocking is used.

In order to provide more control over these features / modifications, a simple build tag that allows disabling mock functionality (and all that comes with it) would be helpful. Depending on the scenario, this could also be used as a "production mode" toggle for projects using slimcap (squeezing out the last bit of performance while also removing all mock code & specifics from production binaries).

DoD

  • Add build tag slimcap_nomock
  • Restructure code and tests so that the toggle disables mock handling and maximizes throughput in that case
@fako1024 fako1024 added enhancement New feature or request performance Performance / optimization related topics labels Aug 28, 2023
@fako1024 fako1024 added this to the Initial Release (v1) milestone Aug 28, 2023
@fako1024 fako1024 self-assigned this Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance Performance / optimization related topics
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant