简体   繁体   English

如何测量惯性应用程序的页面加载性能

[英]how to measure page load performance on inertiajs app

i need to measure page load performance on inertiajs app.我需要测量惯性应用程序的页面加载性能。 since inertiajs is more like SPA, i'm not sure i can do server side render time after index page loaded.由于惯性js更像SPA,我不确定在加载索引页面后我是否可以进行服务器端渲染时间。 i just wondering is there a way to do this in inertiajs app?to measure how long the time between page routes/requests.我只是想知道在惯性应用程序中有没有办法做到这一点?测量页面路由/请求之间的时间。

:) I think you might be looking for the out of the box progress indicator . :) 我认为您可能正在寻找开箱即用的进度指示器 You can add an event listener when a new Inertia visit is initiated.您可以在启动新的 Inertia 访问时添加事件侦听器。

With that, you can start a timer whenever an event is fired.这样,您可以在触发事件时启动计时器。 :) :)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM