编写 YSlow 和/或 PageSpeed 脚本
当我开始在工作中进行一些前端工程时,我想正确量化所实现的加速。
我希望能够使用由 YSlow 或 Google Page Speed 测量的 50 个页面加载时间的平均值。显然,我不想重新加载 50 次并记下该值。
是否有 FF 插件,或者我必须自己编写 Firebug 扩展?或者也许有一个非 FF 命令行工具可以完成我的计划?
As I'm starting to do some front end engineering at work, I would like to properly quantify the speedup achieved.
I would like to be able to use an average value of, say, 50 page load times measured by YSlow or Google Page Speed. Obviously, I don't want to hit reload 50 times and write down the value.
Is there a FF plugin for that or will I have to write a Firebug extension myself? Or maybe there is a non-FF, command-line tool that does what I'm planning?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
为此,我最近在苏黎世举行的 Google 测试自动化大会上就此做了一次演讲。
它的幻灯片位于这里
我在我的公司网站上写了一篇关于它的博客文章可以在此处找到
我们能够使用YSlow Beacon 和 Selenium 一起实现整个过程的自动化。
我希望这有帮助!
I recently did a talk about this at Google Test Automation Conference in Zurich for this.
Slides for it are here
And I did a blog post on my company site about it and that can be found here
We were able to use the YSlow Beacon and Selenium together to automate the entire process.
I hope that helps!
另请查看 GTmetrix,它可以出于各种原因进行 PageSpeed 和 YSlow 分析,并且有一个免费的 API,您可以使用它来实现自动化这。
Also check out GTmetrix which can do PageSpeed and YSlow analysis from a variety of reasons and has a free API you can use to automate this.
不确定您是否在开发工作流程中使用 Grunt,但是有一个很棒的包可以轻松编写脚本 - 请查看:
https://www.npmjs.org/package/grunt-pagespeed
运行后会输出结果如下:
或者,如果您更喜欢自己编写,Google PageSpeed API 也非常易于使用。查看此博文了解更多信息:
http ://deanhume.com/home/blogpost/the-google-pagespeed-api-and-mvc-4/86
Not sure if you use Grunt in your development workflow, but there is a great package avaible that allows for easy scripting - check it out:
https://www.npmjs.org/package/grunt-pagespeed
Once you run it, it will output the results as follows:
Or, if you prefer to write your own, the Google PageSpeed API is also quite easy to use. Check out this blog post for more information:
http://deanhume.com/home/blogpost/the-google-pagespeed-api-and-mvc-4/86