IMetricCollectorReceiver
public
interface
IMetricCollectorReceiver
| com.android.tradefed.device.metric.IMetricCollectorReceiver |
如果 IRemoteTest 需要获取测试运行的 IMetricCollector 列表,则需要实现的接口。
实现此接口的测试不会使用收集器对默认的 ITestInvocationListener 进行插桩,而是必须通过 IMetricCollector.init(IInvocationContext,ITestInvocationListener) 自行完成。
某些测试机制涉及缓冲 Tradefed 回调并在最后重放(如 ITestSuite 中所示),这种机制会导致在重放期间(而非实际执行期间)调用收集器。通过让测试运行程序处理何时使用收集器,我们可以确保在适当的时间处理回调。
In order to use the collectors, the following pattern can be used:
for (IMetricCollector collector : config.getMetricCollectors()) {
originalCollector = collector.init(mModuleInvocationContext, originalCollector);
}
摘要
公共方法 | |
|---|---|
abstract
void
|
setMetricCollectors(List<IMetricCollector> collectors)
设置为测试运行定义的 |
公共方法
setMetricCollectors
public abstract void setMetricCollectors (List<IMetricCollector> collectors)
设置为测试运行定义的 IMetricCollector 列表。
| 参数 | |
|---|---|
collectors |
List |