Skip to content

test: Run Performance Tests in CI #1482

Description

@philipphofmann

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:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions