大家好,
您能否请任何人帮助计算每个页面的加载时间。我想做网页的性能分析。下面的代码适用于完整的执行时间。但我想在每次点击后计算每个加载页面。
navigationStart = driver.execute_script("return window.performance.timing.navigationStart")
responseStart = driver.execute_script("return window.performance.timing.responseStart")
domComplete = driver.execute_script("return window.performance.timing.domComplete")
backendPerformance_calc = responseStart - navigationStart
frontendPerformance_calc = domComplete - responseStart
print("Back End: %s" % backendPerformance_calc)
print("Front End: %s" % frontendPerformance_calc)
谁能帮我解决这个问题。