Version: 2020.2
LanguageEnglish
  • C#

AsyncReadManagerMetrics.ClearCompletedMetrics

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public static void ClearCompletedMetrics();

Description

Clears the metrics for all completed requests, including failed and canceled requests.

You can also clear metrics data when you call GetMetrics or GetCurrentSummaryMetrics by passing in the appropriate AsyncReadManager.Flags. Consider how and when you clear metrics data. You want to avoid collecting duplicate metrics records, but you also want to avoid deleting data you haven’t accessed yet. Avoid calling this function from more than one place in your application. For example, if you had two classes attempting to measure these metrics independently, clearing the data in one class would interfere with the other since all the metrics for completed read requests are removed.