有没有办法知道有角度的HttpClient请求执行需要多长时间?
答案 0 :(得分:1)
public myRequest(): Observable<any>{
const startTime = performance.now();
return http.post<any>(url).pipe(
tap(x => {
const endTime = performance.now();
console.log(`Took ${endTime - startTime} to complete.`);
})
)
}