Skip to content
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

Enable MemoryDiagnoser on Legacy Mono #2459

Merged
merged 8 commits into from
Nov 15, 2023
Merged

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
Co-authored-by: Tim Cassell <35501420+timcassell@users.noreply.github.com>
@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!

@timcassell timcassell merged commit fc7afed into dotnet:master Nov 15, 2023
7 checks passed
@timcassell timcassell added this to the v0.13.11 milestone Nov 15, 2023
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