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

Make Benchmarks.Droid runnable as APK for perf testing #14447

Merged
merged 5 commits into from
Apr 18, 2023

Conversation

LoopedBard3
Copy link
Member

Description of Change

Sets up the Benchmarks.Droid test app for testing as an APK in the performance lab. This change is being done in conjunction with work to get Android BenchmarkDotnet runs working: https://github.com/dotnet/performance/pull/2955/files

Setup env vars to be replaced and INLAB to always be one.

Shift perflab dependencies to the app build (Runtime) through insertion rather than being in the Maui repo.
@ghost ghost added the community ✨ Community Contribution label Apr 6, 2023
@ghost
Copy link

ghost commented Apr 6, 2023

Hey there @LoopedBard3! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@Eilon Eilon added the legacy-area-perf Startup / Runtime performance label Apr 7, 2023
@rmarinho
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

Comment on lines -16 to -17
<!-- HACK: to workaround System.IO.FileNotFoundException: /System.Private.CoreLib.dll -->
<EmbedAssembliesIntoApk>false</EmbedAssembliesIntoApk>
Copy link
Member

Choose a reason for hiding this comment

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

I had to use a nightly BenchmarkDotNet to remove this change:

jonathanpeppers/BenchmarkDotNet-Android@2a05887

Did 0.13.5 work for you somehow?

We need this fix to be in the release on NuGet.org: dotnet/BenchmarkDotNet@2cce425

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm.. would adding the BDN prerelease feed that my team manages to the Nuget.Config file work?
<add key="benchmark-dotnet-prerelease" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/benchmark-dotnet-prerelease/nuget/v3/index.json" />.
I would also update the version specified to match the one we have there (0.13.5.2136). This is also assuming that adding the nightly feed would not be doable.

Copy link
Member

Choose a reason for hiding this comment

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

We can add a dnceng feed, but probably not one like <add key="bdn-ci" value="https://ci.appveyor.com/nuget/benchmarkdotnet" />.

Comment on lines 30 to 43
System.Environment.SetEnvironmentVariable("PERFLAB_INLAB", "1");
System.Environment.SetEnvironmentVariable("PERFLAB_BUILDTIMESTAMP", "0001-01-01T00:00:00.0000000Z");
System.Environment.SetEnvironmentVariable("PERFLAB_BUILDNUM", "REPLACE_BUILDNUM");
System.Environment.SetEnvironmentVariable("DOTNET_VERSION", "REPLACE_DOTNET_VERSION");
System.Environment.SetEnvironmentVariable("PERFLAB_HASH", "REPLACE_HASH");
System.Environment.SetEnvironmentVariable("HELIX_CORRELATION_ID", "REPLACE_HELIX_CORRELATION_ID");
System.Environment.SetEnvironmentVariable("PERFLAB_PERFHASH", "REPLACE_PERFLAB_PERFHASH");
System.Environment.SetEnvironmentVariable("PERFLAB_RUNNAME", "REPLACE_PERFLAB_RUNNAME");
System.Environment.SetEnvironmentVariable("HELIX_WORKITEM_FRIENDLYNAME", "REPLACE_HELIX_WORKITEM_FRIENDLYNAME");
System.Environment.SetEnvironmentVariable("PERFLAB_REPO", "REPLACE_PERFLAB_REPO");
System.Environment.SetEnvironmentVariable("PERFLAB_BRANCH", "REPLACE_PERFLAB_BRANCH");
System.Environment.SetEnvironmentVariable("PERFLAB_QUEUE", "REPLACE_PERFLAB_QUEUE");
System.Environment.SetEnvironmentVariable("PERFLAB_BUILDARCH", "REPLACE_PERFLAB_BUILDARCH");
System.Environment.SetEnvironmentVariable("PERFLAB_LOCALE", "REPLACE_PERFLAB_LOCALE");
Copy link
Member

Choose a reason for hiding this comment

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

I think implicit usings are enabled in this project:

<ImplicitUsings>enable</ImplicitUsings>

Do you need to put System. on all of these?

Copy link
Member

Choose a reason for hiding this comment

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

Could we also condition all these behind a #if PERFLAB? And then you can set $(DefineConstants) as needed from your pipeline?

Copy link
Member Author

Choose a reason for hiding this comment

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

I will get a test with these changes going.

@github-actions
Copy link
Contributor

Thank you for your pull request. We are auto-formatting your source code to follow our code guidelines.

… Add the Dotnet Perf Team private BDN prerelease feed to the nuget.config and update the BDN reference for the app to be the latest in the prerelease feed.
@rmarinho
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@rmarinho
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@rmarinho rmarinho merged commit 35fb40c into dotnet:main Apr 18, 2023
29 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 12, 2023
@Eilon Eilon added the t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.) label May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community ✨ Community Contribution legacy-area-perf Startup / Runtime performance t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants