runtime & memory usage to body interceptors#1043
Conversation
…feature-get-performance-of-bodyinterceptors-runtime-and-memory-consumption
| long usedMemoryAfter = runtime.totalMemory() - runtime.freeMemory(); | ||
| long memoryUsed = (usedMemoryAfter - usedMemoryBefore) / MB; | ||
|
|
||
| biMetric.setRuntime(biMetricMap.get(bodyInterceptor).getRuntime() + duration); |
There was a problem hiding this comment.
Maybe in the future for Metrics objects, we might need to modify Long objects and here as well I'm setting object values for runtime and memory usage hence I used Long in BodyInterceptorMetric, and inside the runtime interceptBody calculation of that is fixed and I'm just reading the value hence I used primitive long here. @palaniappan1
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1043 +/- ##
=============================================
- Coverage 71.90% 69.41% -2.49%
- Complexity 4453 4468 +15
=============================================
Files 367 375 +8
Lines 16403 17062 +659
Branches 2748 2964 +216
=============================================
+ Hits 11794 11843 +49
- Misses 3694 4300 +606
- Partials 915 919 +4 ☔ View full report in Codecov by Sentry. |
|
FYI, java.util.* has almost 70-80 classes & interfaces included. You just used 2 or 3 classes, then why do we need that whole package imported. I cleaned it up, so no worries :) |
|
|
||
| public class BodyInterceptorMetric { | ||
|
|
||
| private Long runtime; |
There was a problem hiding this comment.
It would be better to use long (primitive type) instead of Long (Object type), I don't see the usecase of using Object type here.
No description provided.