You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func testScrollingAnimationPerformance()throws{
app.launch()
app.staticTexts["Meal Planner"].tap()letfoodCollection= app.collectionViews.firstMatch
letmeasureOptions=XCTMeasureOptions()
measureOptions.invocationOptions =[.manuallyStop]// 이렇게 지정하면 블록 중간에 stopMeasuring 지정할 수 있음measure(metrics:[XCTOSSignpostMetric.scrollDecelerationMetric],// 스크롤 측정
options: measureOptions){
foodCollection.swipeUp(velocity:.fast)// start stopMeasuring()
foodCollection.swipeDown(velocity:.fast)// reset}}
MetricKit을 구성하면 iOS 14에서는 24시간 간격으로 원격 이슈 파악 가능하고
iOS 15에서는 즉시 이슈 파악 가능함...!!!!
func startAnimating(){// Mark the beginning of animationsmxSignpostAnimationIntervalBegin(
log:MXMetricManager.makeLogHandle(category:"animation_telemetry"),
name:"custom_animation”)}func animationDidComplete() { // Mark the end of the animation to receive the collected hitch rate telemetry mxSignpost(OSSignpostType.end, log: MXMetricManager.makeLogHandle(category: "animation_telemetry"),
name:"custom_animation")}
https://developer.apple.com/videos/play/wwdc2021/10181/
툴이 되게 많음
자 이렇게 따라가 봅시다
Battery usage
스프레이 버튼 > Energy Impact 들어가서 Energy Impact 확인할 수 있음
MetricKit
원격 측정 프레임워크. 릴리즈된 앱을 측정하는데 도움이 될 수 있음
앱 사용 퍼포먼스 -> 애플 서버에 전달됨 -> Xcode Organizer에서 볼 수 있음
Organizer 켜면 Battery Usage 확인할 수 있음. 최근 16개 버전 볼 수 있음
Regression Pane
어떤 부분이 이슈를 만들어내는지 보려면, Report 아래에 있는 Energy Organizer를 보면 됨
배터리 성능 측정에 대해 더 알아보기
Hang rate and scrolling
여기서 빨간 막대는 스크롤 경험이 안좋을 수록 표시됨 (렉 걸리는 그 느낌...)
Instruments로 어느 부분이 Hang을 일으키는지 분석할 수 있음
스크롤 경험을 XCTest로 측정할 수 있음
MetricKit을 구성하면 iOS 14에서는 24시간 간격으로 원격 이슈 파악 가능하고
iOS 15에서는 즉시 이슈 파악 가능함...!!!!
더 알아보기
Understand and eliminate hangs from your app, WWDC21 - https://developer.apple.com/videos/play/wwdc2021/10258/
Disk Writes
Instruments 통해서 Disk I/O 확인할 수 있음
Disk Usage를 XCTest로 측정할 수 있음
baseline를 설정해서 그것보다 퍼포먼스가 안나오면 테스트 실패되게 만들 수 있음
이미 출시된 버전은 Organizer를 통해 확인 가능
Report 섹션 아래의 Disk Writes
앱이 24시간 내에 1GB 이상 디스크 쓰기를 하면 Report
Xcode13 에서는 어떻게 고쳐야할지 Insights 를 제공함.
Disk Write 이슈 더 알아보기:
Diagnose power and performance regressions in your app, WWDC21 - https://developer.apple.com/videos/play/wwdc2021/10087/
Launch time and termination
Organizer > Launch time
Organizer > Termination
Instruments > App Launch
앞서 본 것 처럼 XCTest를 활용할 수도 있음
MetricKit이 앱에 구현되어 있으면 daily metric payload로 매일 받아볼 수 있음
왜 앱이 종료되는지 자세히 확인하고 싶다면?
Why is my app getting killed?, WWDC 20 - https://developer.apple.com/videos/play/wwdc2020/10078/
Memory
Organizer > Memory
Instruments > Leaks, Allocations, VM Tracker
MetricKit
더 알아보기:
Detect and diagnose memory issues #36
https://developer.apple.com/videos/play/wwdc2021/10180/
Next step
The text was updated successfully, but these errors were encountered: