Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

MichalPetryka
Copy link
Contributor

@MichalPetryka MichalPetryka commented Nov 2, 2023

This enables MemoryDiagnoser on Legacy Mono (since it provides GetAllocatedBytesForCurrentThread) and makes it more resilient to errors.

This enables MemoryDiagnoser on Legacy Mono and makes it more resilient to errors.
@MichalPetryka MichalPetryka marked this pull request as draft November 2, 2023 01:54
@timcassell
Copy link
Collaborator

@MichalPetryka Is this good to go? It's still in draft.

@MichalPetryka MichalPetryka marked this pull request as ready for review November 15, 2023 21:13
@MichalPetryka
Copy link
Contributor Author

Is this good to go?

I wanted to check with a test benchmark and forgot about it, it seems to work fine:

| Method | Job                | Runtime            | Mean      | Error     | StdDev    | Gen0   | Allocated |
|------- |------------------- |------------------- |----------:|----------:|----------:|-------:|----------:|
| Alloc  | .NET 8.0           | .NET 8.0           | 11.401 ns | 1.2076 ns | 3.5605 ns | 0.0255 |      40 B |
| Alloc  | .NET Framework 4.8 | .NET Framework 4.8 |  6.179 ns | 0.6341 ns | 1.8597 ns | 0.0255 |      40 B |
| Alloc  | Mono               | Mono               | 16.793 ns | 1.1951 ns | 3.5238 ns | 0.0115 |      48 B |
| Alloc  | Mono with .NET 8.0 | Mono with .NET 8.0 | 18.935 ns | 0.3219 ns | 0.3832 ns | 0.0115 |      48 B |

@timcassell
Copy link
Collaborator

Yep, I tested it with my own benchmarks also, and it all seems good to me. Thanks @MichalPetryka!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants