Add KDoc documentation to Cache averaging algorithm#600
Closed
gioalex07 wants to merge 2 commits intoVREMSoftwareDevelopment:mainfrom
Closed
Add KDoc documentation to Cache averaging algorithm#600gioalex07 wants to merge 2 commits intoVREMSoftwareDevelopment:mainfrom
gioalex07 wants to merge 2 commits intoVREMSoftwareDevelopment:mainfrom
Conversation
Document the exponential moving average used in calculate(), the cache depth strategy in size() based on scan speed thresholds, the eviction logic in add(), and the purpose of CacheResult. No logic changes.
Owner
|
Thank you for the submission. This PR will not be merged. The added comments do not improve readability, maintainability, or functionality. They restate what the code already expresses and do not clarify intent, behavior, or design decisions. The project does not accept changes that add noise without providing a clear benefit to the UI/UX, code quality, or user experience. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #600 +/- ##
=========================================
Coverage 97.83% 97.83%
Complexity 975 975
=========================================
Files 121 121
Lines 2581 2581
Branches 211 211
=========================================
Hits 2525 2525
Misses 19 19
Partials 37 37 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Document the exponential moving average used in calculate(), the cache depth strategy in size() based on scan speed thresholds, the eviction logic in add(), and the purpose of CacheResult. No logic changes.
Summary
Cache.ktexplaining the averaging algorithm and cache sizing strategy.What does this implement/fix?
CacheResult: documents purpose of the classscanResults(): documents the grouping and averaging behavior per unique access point (BSSID + SSID)add(): documents eviction strategy and internal count cyclesize(): documents all scan speed thresholds and their effect on cache depthcalculate(): documents the exponential moving average formula(previous + current) / 2and the signal penalty applied when screen size is unavailableDoes this close any issues?
How was this tested?
Checklist (required before marking ready)
app/src/test/) — N/A, documentation onlyAdditional context
The
calculate()method used an exponential moving average without any inline explanation,making it non-obvious why
(accumulator + element) / 2was chosen over a true N-sample average.The
size()thresholds were also implicit. This PR makes both strategies explicit for future contributors.