forked from xamarin/xamarin-macios
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tests] Add perf test for calling Marshal.AllocHGlobal/FreeHGlobal.
Also add a 'SupportedOSPlatformVersion' value to the .NET perftest project file, to cope with recent changes in our .NET support. Ref: dotnet/runtime#58939.
- Loading branch information
1 parent
f559399
commit 0310d34
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
using BenchmarkDotNet.Attributes; | ||
|
||
namespace PerfTest { | ||
|
||
public class ManagedRuntime { | ||
[Benchmark] | ||
public void AllocHGlobal () | ||
{ | ||
Marshal.FreeHGlobal (Marshal.AllocHGlobal (1)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters