HttpMetric可以不调用start/stop直接设置时间吗?

Can HttpMetric set time directly without calling start/stop?

为了更简洁的代码风格,我只想知道有没有办法不使用 start()stop() 直接设置 HttpMetric 时间属性。 因为我可以直接获取时间,不想为其添加任何 start/stop 侦听器。 我发现 HttpMetric 有一个 putAttribute 方法,所以我想可以直接设置时间。

根据文档 https://firebase.google.com/docs/perf-mon/get-started-android#manual-network,这是不可能的。使用 start() 和 stop() 是使用 HTTPMetric 的推荐方式。