[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-25 (世界標準時間)。"],[],[],null,["\u003cbr /\u003e\n\niOS+ Android \n\n\u003cbr /\u003e\n\nPerformance Monitoring uses *traces* to collect data about monitored processes in your app.\nA trace is a report that contains data captured between two points in time\nin your app.\n\nFor Apple and Android apps, Performance Monitoring *automatically* measures the rendering\nperformance of different screens in your application. Performance Monitoring creates a\n***screen rendering trace*** for every screen in your application. These traces\ncollect and measure the following metrics:\n\n- [Slow rendering frames](#slow-rendering-frames) --- Measures the percentage of\n screen instances that take longer than 16ms to render.\n\n- [Frozen frames](#frozen-frames) --- Measures the percentage of screen instances\n that take longer than 700ms to render.\n\nSlow or frozen frames in your application might result in poor device\nperformance, also known as jank or lag. Capturing frozen and slow rendering\nframe metrics can help you identify underperforming screens, giving you the\nability to improve the rendering performance of your application.\n\nYou can view data for screen rendering traces in the *Screen rendering* tab of\nthe traces table. The traces table is located at the bottom of the *Performance*\npage of the [Firebase console](//console.firebase.google.com/). For more information, see [Track, view, and\nfilter performance data](#monitor-in-console).\n| These out-of-the-box traces get you started with monitoring your app, but to learn about the performance of specific tasks or flows in your app, try out [instrumenting your own custom\n| traces of code](/docs/perf-mon/custom-code-traces) in your app.\n\nMetrics collected by screen rendering traces\n\nThese traces are out-of-the-box traces, so you cannot add custom metrics or\ncustom attributes to them.\n\nSlow rendering frames and frozen frames are calculated with an assumed device\nrefresh rate of 60Hz. If a device refresh rate is lower than 60Hz, each frame\nwill have a slower rendering time because fewer frames are rendered per second.\nSlower rendering times can cause more slow or frozen frames to be reported\nbecause more frames will be rendered slower or will freeze. However, if a device\nrefresh rate is higher than 60Hz, each frame will have a faster rendering time.\nThis can cause fewer slow or frozen frames to be reported. This is a current\nlimitation in the Performance Monitoring SDK.\n\nSlow rendering frames\n\nThis metric is the percentage of user sessions that experienced a noticeable\namount of slow rendering for a specific screen. Specifically, this metric is the\npercentage of screen instances during which more than 50% of frames took longer\nthan 16 ms to render.\n\nFrozen frames\n\nThis metric is the percentage of user sessions that experienced a noticeable\namount of frozen frames for a specific screen. Specifically, this metric is the\npercentage of screen instances during which more than 0.1% of frames took longer\nthan 700 ms to render.\n\nHow are screen rendering traces generated?\n\n- Starts for every UIViewController in the keyWindow when the app calls\n `viewDidAppear:`.\n\n- Stops when the app calls `viewDidDisappear:`.\n\nNote that screen rendering traces don't capture canonical container view\ncontrollers.\n\nTrack, view, and filter performance data\n\nTo view real-time performance data, make sure that your app uses a Performance\nMonitoring SDK version that's compatible with real-time data processing.\n[Learn more about real-time performance data](/docs/perf-mon/troubleshooting#faq-real-time-data).\n\nTrack key metrics in your dashboard\n\nTo learn how your key metrics are trending, add them to your metrics board at the top of the\n*Performance* dashboard. You can quickly identify regressions by seeing week-over-week\nchanges or verify that recent changes in your code are improving performance.\nFirebase Performance Monitoring dashboard\" /\\\u003e\n\nTo add a metric to your metrics board, follow these steps:\n\n1. Go to the [*Performance* dashboard](//console.firebase.google.com/project/_/performance)in the Firebase console.\n2. Click an empty metric card, then select an existing metric to add to your board.\n3. Click more_vert on a populated metric card for more options, for example to replace or remove a metric.\n\n\u003cbr /\u003e\n\nThe metrics board shows collected metric data over time, both in graphical form and as a\nnumerical percentage change.\n\nLearn more about [using the dashboard](/docs/perf-mon/console).\n\nView screen performance on console\n\nTo view your traces, go to the\n[*Performance* dashboard](//console.firebase.google.com/project/_/performance)\nin the Firebase console, scroll down to the traces table, then click the appropriate subtab.\nThe table displays some top metrics for each trace, and you can even sort the list by the\npercentage change for a specific metric.\n\nPerformance Monitoring provides a troubleshooting page in the Firebase console that highlights metric\nchanges, making it easy to quickly address and minimize the impact of performance issues on your\napps and users. You can use the troubleshooting page when you learn about potential\nperformance issues, for example, in the following scenarios:\n\n- You select relevant metrics on the dashboard and you notice a big delta.\n- In the traces table you sort to display the largest deltas at the top, and you see a significant percentage change.\n- You receive an email alert notifying you of a performance issue.\n\nYou can access the troubleshooting page in the following ways:\n\n- On the metric dashboard, click the **View metric details** button.\n- On any metric card, select **more_vert\n =\\\u003e View details**. The troubleshooting page displays information about the metric you selected.\n- In the traces table, click a trace name or any metric value in the row associated with that trace.\n- In an email alert, click **Investigate now**.\n\nWhen you click a trace name in the traces table, you can then drill down into metrics of\ninterest. Click the\n**Filteradd** button to filter the data\nby attribute, for example:\nFirebase Performance Monitoring data being filtered by attribute\" /\\\u003e\n\n- Filter by *App version* to view data about a past release or your latest release\n- Filter by *Device* to learn how older devices handle your app\n- Filter by *Country* to make sure your database location isn't affecting a specific region\n\nLearn more about\n[viewing data for your\ntraces](/docs/perf-mon/console#view-traces-and-data).\n\nNext Steps\n\n- Learn more about\n [using attributes](/docs/perf-mon/attributes) to examine performance data.\n\n- Learn more about how to\n [track performance issues](/docs/perf-mon/issue-management) in the\n Firebase console."]]