Version: 2019.4
public void FilterToCurrentThread ();

説明

Configures the recorder to only collect data from the current thread.

By default, a Recorder collects samples from its corresponding Sampler regardless of which thread those samples occur on. Call this function to limit sample collection to the current thread only.

Limiting sample collection to the current thread is particularly useful when performing tests with very commonly-used samplers (such as GC.Alloc), as ensuring that background threads are not active during the test can be difficult.

Reset the Recorder to collect samples from all threads by calling Recorder.CollectFromAllThreads.

Note that when you have more than one Recorder object for the same Sampler, this filter setting affects all of them. If all of these Recorder instances are destroyed, any new Recorder instances obtained for the Sampler revert to the default behavior and collect samples from all threads. However, because it is difficult to predict the timing of object destruction, always call Recorder.CollectFromAllThreads to reset sample collection.

Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961