-
Notifications
You must be signed in to change notification settings - Fork 113
[all] Include PubSubMessageHeaders size in ImmutablePubSubMessage heap size estimation #2287
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -98,6 +98,7 @@ public String toString() { | |
| public int getHeapSize() { | ||
| /** The {@link #topicPartition} is supposed to be a shared instance, and is therefore ignored. */ | ||
| return SHALLOW_CLASS_OVERHEAD + InstanceSizeEstimator.getObjectSize(key) | ||
| + InstanceSizeEstimator.getObjectSize(value) + InstanceSizeEstimator.getObjectSize(pubSubPosition); | ||
| + InstanceSizeEstimator.getObjectSize(value) + InstanceSizeEstimator.getObjectSize(pubSubPosition) | ||
| + (pubSubMessageHeaders != null ? InstanceSizeEstimator.getObjectSize(pubSubMessageHeaders) : 0); | ||
|
||
| } | ||
| } | ||
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.
[nitpick] The buffer capacity increase from 10000 to 100000 (10x) appears to be a significant change for a test configuration. While this change may be necessary due to the more accurate heap size calculation now including headers, it would be helpful to add a comment explaining why this specific value was chosen and how it relates to the heap size estimation fix. This will help future maintainers understand the relationship between this test configuration and the heap size calculation change.