Skip to content

Commit

Permalink
[tests] Add perf test for calling Marshal.AllocHGlobal/FreeHGlobal. (#…
Browse files Browse the repository at this point in the history
…12696)

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
rolfbjarne committed Sep 13, 2021
1 parent 9a7000f commit f75a7b5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/perftest/ManagedRuntime.cs
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));
}
}
}
1 change: 1 addition & 0 deletions tests/perftest/dotnet/perftest.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<MonoBundlingExtraArgs>--marshal-objectivec-exceptions:disable --registrar:static</MonoBundlingExtraArgs>
<LinkMode>None</LinkMode> <!-- never link -->
<Optimize>true</Optimize> <!-- always optimize -->
<SupportedOSPlatformVersion>10.15</SupportedOSPlatformVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.12.1" />
Expand Down

5 comments on commit f75a7b5

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

❌ [CI Build] Tests failed on Build ❌

Tests failed on Build.

API diff

✅ API Diff from stable

View API diff

API & Generator diff

API Diff (from PR only) (no change)
Generator Diff (only version changes)

Packages generated

View packages

Test results

2 tests failed, 241 tests passed.

Failed tests

  • monotouch-test/Mac Catalyst [dotnet]/Debug [dotnet]: Failed (Tests run: 2644 Passed: 2489 Inconclusive: 35 Failed: 2 Ignored: 153)
  • link all/Mac Catalyst [dotnet]/Debug [dotnet]: TimedOut (Execution timed out after 1200 seconds.
    No test log file was produced)

Pipeline on Agent XAMBOT-1037.BigSur'
[tests] Add perf test for calling Marshal.AllocHGlobal/FreeHGlobal. (#12696)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

⚠️ Tests were not ran (VSTS: device tests tvOS). ⚠️

Results were skipped for this run due to provisioning problems Azure Devops. Please contact the bot administrator.

Pipeline on Agent
[tests] Add perf test for calling Marshal.AllocHGlobal/FreeHGlobal. (#12696)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

✅ Tests passed on macOS M1 - Mac Big Sur (11.5) ✅

Tests passed

All tests on macOS X M1 - Mac Big Sur (11.5) passed.

Pipeline on Agent
[tests] Add perf test for calling Marshal.AllocHGlobal/FreeHGlobal. (#12696)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

⚠️ Tests were not ran (VSTS: device tests iOS). ⚠️

Results were skipped for this run due to provisioning problems Azure Devops. Please contact the bot administrator.

Pipeline on Agent
[tests] Add perf test for calling Marshal.AllocHGlobal/FreeHGlobal. (#12696)

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

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

✅ Tests passed on macOS Mac Mojave (10.14) ✅

Tests passed

All tests on macOS X Mac Mojave (10.14) passed.

Pipeline on Agent
[tests] Add perf test for calling Marshal.AllocHGlobal/FreeHGlobal. (#12696)

Please sign in to comment.