Skip to content

Shrink SubmissionResponse#253

Merged
ejsmith merged 1 commit intoexceptionless:masterfrom
benaadams:SubmissionResponse
Apr 18, 2021
Merged

Shrink SubmissionResponse#253
ejsmith merged 1 commit intoexceptionless:masterfrom
benaadams:SubmissionResponse

Conversation

@benaadams
Copy link
Copy Markdown
Contributor

Inspecting with ObjectLayoutInspector TypeLayout.PrintLayout<SubmissionResponse>()

Pre

Type layout for 'SubmissionResponse'
Size: 32 bytes. Paddings: 5 bytes (%15 of empty space)
|================================================================|
| Object Header (8 bytes)                                        |
|----------------------------------------------------------------|
| Method Table Ptr (8 bytes)                                     |
|================================================================|
|   0-7: String <Message>k__BackingField (8 bytes)               |
|----------------------------------------------------------------|
|  8-15: Exception <Exception>k__BackingField (8 bytes)          |
|----------------------------------------------------------------|
| 16-19: Int32 <StatusCode>k__BackingField (4 bytes)             |
|----------------------------------------------------------------|
|    20: Boolean <Success>k__BackingField (1 byte)               |
|----------------------------------------------------------------|
|    21: Boolean <BadRequest>k__BackingField (1 byte)            |
|----------------------------------------------------------------|
|    22: Boolean <ServiceUnavailable>k__BackingField (1 byte)    |
|----------------------------------------------------------------|
|    23: Boolean <PaymentRequired>k__BackingField (1 byte)       |
|----------------------------------------------------------------|
|    24: Boolean <UnableToAuthenticate>k__BackingField (1 byte)  |
|----------------------------------------------------------------|
|    25: Boolean <NotFound>k__BackingField (1 byte)              |
|----------------------------------------------------------------|
|    26: Boolean <RequestEntityTooLarge>k__BackingField (1 byte) |
|----------------------------------------------------------------|
| 27-31: padding (5 bytes)                                       |
|================================================================|

Post

Type layout for 'SubmissionResponse'
Size: 24 bytes. Paddings: 4 bytes (%16 of empty space)
|=======================================================|
| Object Header (8 bytes)                               |
|-------------------------------------------------------|
| Method Table Ptr (8 bytes)                            |
|=======================================================|
|   0-7: String <Message>k__BackingField (8 bytes)      |
|-------------------------------------------------------|
|  8-15: Exception <Exception>k__BackingField (8 bytes) |
|-------------------------------------------------------|
| 16-19: Int32 <StatusCode>k__BackingField (4 bytes)    |
|-------------------------------------------------------|
| 20-23: padding (4 bytes)                              |
|=======================================================|


namespace Exceptionless.Submission {
public class SubmissionResponse {
internal static readonly SubmissionResponse Ok200 = new(200, "Ok");
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for a followup PR

@benaadams benaadams force-pushed the SubmissionResponse branch from f338d8a to 061f4e2 Compare April 18, 2021 00:00
@ejsmith
Copy link
Copy Markdown
Member

ejsmith commented Apr 18, 2021

Oh wow... that's pretty interesting. Thanks!

Copy link
Copy Markdown
Member

@ejsmith ejsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ejsmith ejsmith merged commit b81c79e into exceptionless:master Apr 18, 2021
@benaadams benaadams deleted the SubmissionResponse branch April 18, 2021 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants