-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add device filter for file system scraper #1379
Add device filter for file system scraper #1379
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1379 +/- ##
==========================================
- Coverage 90.32% 90.32% -0.01%
==========================================
Files 218 218
Lines 15292 15311 +19
==========================================
+ Hits 13812 13829 +17
- Misses 1071 1072 +1
- Partials 409 410 +1
Continue to review full report at Codecov.
|
65d03a3
to
272eb80
Compare
// filter devices by name | ||
filteredUsages := make([]*deviceUsage, 0, len(usages)) | ||
for _, usage := range usages { | ||
if s.includeDevice(usage.deviceName) { | ||
filteredUsages = append(filteredUsages, usage) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can be optimized:
filteredUsages := usage
s.includeFS != nil || s.excludeFS != nil {
filteredUsages := make([]*deviceUsage, 0, len(usages))
for _, usage := range usages {
if s.includeDevice(usage.deviceName) {
filteredUsages = append(filteredUsages, usage)
}
}
}
* Update core version during build During build we need to also update the core version file, otherwise, the internal metrics show "latest" instead of the real version. * Update Makefile
No description provided.