We get the memgraph on running the UITests via xcodebuild command and on passing the following parameter:
-enablePerformanceTestsDiagnostics YES
The memgraph is attached as a part of each UITest and is a part of the XCResult file generated at the end of test. This is generally the last step in the test recorded in the xcresult file.
Attached below is a screenshot for reference.