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

Refactor periodic loggers and limit batch size for small packets #2835

Merged
merged 2 commits into from
Jul 13, 2024

Conversation

ns6089
Copy link
Contributor

@ns6089 ns6089 commented Jul 12, 2024

Description

Refactor recurring code into dedicated classes and address small edge-case I missed in #2803

Screenshot

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.

  • I want maintainers to keep my branch updated

@cgutman cgutman enabled auto-merge (squash) July 13, 2024 17:00
Copy link

codecov bot commented Jul 13, 2024

Codecov Report

Attention: Patch coverage is 15.00000% with 68 lines in your changes missing coverage. Please review.

Project coverage is 9.12%. Comparing base (8187a28) to head (68bcd35).
Report is 130 commits behind head on master.

Files with missing lines Patch % Lines
src/logging.h 32.35% 18 Missing and 5 partials ⚠️
src/stream.cpp 0.00% 4 Missing and 8 partials ⚠️
src/platform/linux/kmsgrab.cpp 0.00% 6 Missing ⚠️
src/platform/linux/wlgrab.cpp 0.00% 6 Missing ⚠️
src/platform/linux/x11grab.cpp 0.00% 6 Missing ⚠️
src/platform/linux/cuda.cpp 0.00% 3 Missing ⚠️
src/platform/windows/display_base.cpp 0.00% 3 Missing ⚠️
src/stat_trackers.h 25.00% 2 Missing and 1 partial ⚠️
src/nvenc/nvenc_base.cpp 0.00% 0 Missing and 2 partials ⚠️
src/stat_trackers.cpp 0.00% 2 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff            @@
##           master   #2835      +/-   ##
=========================================
+ Coverage    9.04%   9.12%   +0.07%     
=========================================
  Files          96      97       +1     
  Lines       17437   17433       -4     
  Branches     8275    8314      +39     
=========================================
+ Hits         1578    1590      +12     
- Misses      12972   13020      +48     
+ Partials     2887    2823      -64     
Flag Coverage Δ
Linux 6.83% <5.97%> (+0.03%) ⬆️
Windows 4.35% <18.18%> (+0.09%) ⬆️
macOS-12 10.18% <16.32%> (+0.10%) ⬆️
macOS-13 10.08% <16.32%> (+0.11%) ⬆️
macOS-14 10.39% <16.32%> (+0.10%) ⬆️

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

Files with missing lines Coverage Δ
src/nvenc/nvenc_base.h 0.00% <0.00%> (ø)
src/platform/common.h 39.74% <0.00%> (+2.83%) ⬆️
src/nvenc/nvenc_base.cpp 0.51% <0.00%> (+<0.01%) ⬆️
src/stat_trackers.cpp 0.00% <0.00%> (ø)
src/platform/linux/cuda.cpp 1.81% <0.00%> (+<0.01%) ⬆️
src/platform/windows/display_base.cpp 12.95% <0.00%> (ø)
src/stat_trackers.h 36.84% <25.00%> (-4.34%) ⬇️
src/platform/linux/kmsgrab.cpp 2.81% <0.00%> (+<0.01%) ⬆️
src/platform/linux/wlgrab.cpp 0.00% <0.00%> (ø)
src/platform/linux/x11grab.cpp 34.76% <0.00%> (+0.01%) ⬆️
... and 2 more

... and 22 files with indirect coverage changes

@ns6089
Copy link
Contributor Author

ns6089 commented Jul 13, 2024

So, macos-12 CI builds failed, but it doesn't appear to be my fault (I can't find any c++ errors).
Feel free to ping me if something needs to be changed.

@ReenigneArcher
Copy link
Member

GitHub api was having some issues earlier

Previously it was limited only by size, and exceeding 64 packets in a
single batch is asking for problems.
@cgutman cgutman merged commit 18e7dfb into LizardByte:master Jul 13, 2024
47 checks passed
KuleRucket pushed a commit to KuleRucket/Sunshine that referenced this pull request Oct 9, 2024
…ardByte#2835)

* Refactor periodic loggers

* Limit network batch size also by packet count

Previously it was limited only by size, and exceeding 64 packets in a
single batch is asking for problems.
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.

3 participants