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

test: Run Performance Tests in CI #1482

Closed
philipphofmann opened this issue Nov 24, 2021 · 2 comments
Closed

test: Run Performance Tests in CI #1482

philipphofmann opened this issue Nov 24, 2021 · 2 comments

Comments

@philipphofmann
Copy link
Member

philipphofmann commented Nov 24, 2021

The unit tests contain a few performance tests. These tests need baselines stored in xcbaselines. Xcode only uses these baselines if the type of machine in the Info.plist and the machine running the tests match. Furthermore, there is no way of defining a generic combo so the tests run on multiple machines. There is no official Apple documentation confirming this, but personal experience and this article strengthen this statement. As the current baselines are taken from a local computer the performance tests don't run in CI.

We could use system_profiler to get the specifications of the machine in CI and update Info.plist accordingly so Xcode runs the performance tests.

Example usage of system_profiler.

system_profiler -detailLevel mini -xml > ~/Desktop/system_report_mini.spx

Specifications needed for the Info.plist file.

<key>1C0AB51E-7DAD-4469-8384-B6DE6A8E9023</key>
<dict>
	<key>localComputer</key>
	<dict>
		<key>busSpeedInMHz</key>
		<integer>400</integer>
		<key>cpuCount</key>
		<integer>1</integer>
		<key>cpuKind</key>
		<string>Quad-Core Intel Core i7</string>
		<key>cpuSpeedInMHz</key>
		<integer>2800</integer>
		<key>logicalCPUCoresPerPackage</key>
		<integer>8</integer>
		<key>modelCode</key>
		<string>MacBookPro15,2</string>
		<key>physicalCPUCoresPerPackage</key>
		<integer>4</integer>
		<key>platformIdentifier</key>
		<string>com.apple.platform.macosx</string>
	</dict>
	<key>targetArchitecture</key>
	<string>x86_64</string>
</dict>

Points to consider:

@philipphofmann
Copy link
Member Author

As pointed out by @bruno-garcia, running performance tests in CI is maybe not the best idea, as you don't have full control over how busy the CI machine is. Maybe it's better to have a dedicated self-hosted machine only running the performance tests. When having remote access to this machine setting up the xcbaselines is going to be straightforward.

@philipphofmann
Copy link
Member Author

We now have performance metrics for the SDK #2067 and also benchmarking workflows. We can close this.

Repository owner moved this from Backlog to Done in Mobile & Cross Platform SDK Sep 22, 2022
philipphofmann added a commit that referenced this issue Apr 6, 2023
CI can't compare the performance test with measure against anything, as Xcode
needs baseline files for the same computer. In CI, the computer specifications might
change frequently, so it's a lot of effort to create those baseline files. This test only
slows down CI, and therefore, we can remove it. For more context see
#1482.
philipphofmann added a commit that referenced this issue Apr 6, 2023
CI can't compare the performance test with measure against anything, as Xcode
needs baseline files for the same computer. In CI, the computer specifications might
change frequently, so it's a lot of effort to create those baseline files. This test only
slows down CI, and therefore, we can remove it. For more context see
#1482.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

1 participant