feat: make metrics build specific#237
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #237 +/- ##
==========================================
- Coverage 59.89% 58.61% -1.29%
==========================================
Files 70 71 +1
Lines 2364 2375 +11
==========================================
- Hits 1416 1392 -24
- Misses 863 903 +40
+ Partials 85 80 -5 ☔ View full report in Codecov by Sentry. |
|
done reviewing, missed this earlier |
|
@shashank11p @puneet-traceable pls take a look as well |
|
Adding some context here: The reason is that |
|
@thugrock7 Pls test it on windows as well |
| return lm.cpuSecondsTotal | ||
| } | ||
|
|
||
| func (lm *linuxMetrics) processStatsFromPid(pid int) (*processStats, error) { |
There was a problem hiding this comment.
no tests for this function? It's fine for this but in general for testing such scenarios
- either file should become a parameter to the function and then you can create custom files to test.
- can pass an io.Reader to the function to read file. (*os.File) implements an io.Reader. During test you can use a mock version.
|
Tested running this by http-server/client scenario on linux, Mac, windows. Works fine |
Description
CPU and memory metrics which are added, making them linux specific. For other platforms using no-op
Testing
Tested on Mac, linux