
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
pageinsight
Advanced tools
###操作系统/浏览器支持
windows:chrome
unix/linux(desktop+server):chrome
android:chrome
###安装
####windows
npm install pagetimeline
####ubuntu
ubuntu通过apt-get安装node后默认运行名为nodejs,需要更名为node,假定nodejs路径为: /usr/bin/nodejs
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo visudo
在secure_path值前面添加/usr/bin
安装pagetimeline:
sudo npm install pagetimeline
遇到nobody账户问题时:
sudo npm install pagetimeline --unsafe-perm
#####centOS
切换到root权限:
su root
安装pagetimeline:
npm install pagetimeline
遇到nobody账户问题时:
npm install pagetimeline --unsafe-perm
如果想得到首屏的热力图截图,请安装GraphicsMagick
本软件依赖的图像处理软模块为gm,需要依赖于GraphicsMagick
###使用示例
标准:
node ./bin/pagetimeline.js --url=http://www.baidu.com --timeout=2000 --verbose
使用配置文件配置:
node ./bin/pagetimeline.js --config=config.json
排除某些基础模块:
node ./bin/pagetimeline.js --url=http://www.baidu.com --skip-modules=assets,har
包含某些特殊模块:
node ./bin/pagetimeline.js --url=http://www.baidu.com --special-modules=hao123global
输出格式为json:
node ./bin/pagetimeline.js --url=http://www.baidu.com --verbose --format=json
输出har文件:
node ./bin/pagetimeline.js --url=http://www.baidu.com --verbose --har-dir=./har/
输出性能热力图截图文件:
node ./bin/pagetimeline.js --url=http://www.baidu.com --verbose --screenshot-dir=./screenshot/
输出性能分析结果文件:
node ./bin/pagetimeline.js --url=http://www.baidu.com --verbpse --result-dir=./result/
使用android chrome测试:
usb连接手机,并启动usb调试功能
node ./bin/pagetimeline.js --url=http://www.baidu.com --verbose --mobile=android
带缓存测试:
测试两遍:no cache vs cache
node ./bin/pagetimeline.js --url=http://www.baidu.com --verbose --reload
测试多遍:no cache vs n cache
node ./bin/pagetimeline.js --url=http://www.baidu.com --verbose --reload --reload-count=10
CLI支持:
node ./bin/pagetimeline.js --url=http://www.baidu.com --silent
此时仅输出结果数据到stdout或者stderr
使用系统自带的浏览器-根据环境变量:
node ./bin/pagetimeline.js --url=http://www.baidu.com --browser-path=env
使用系统自带的浏览器-自定义位置:
node ./bin/pagetimeline.js --url=http://www.baidu.com --browser-path="c:\chrome.exe"
禁止数据上传:
数据默认会上传到sitearchive.baidu.com,进行可视化展现
禁止默认上传:
node ./bin/pagetimeline.js --url=http://www.baidu.com --disable-upload
###命令行参数支持
###支持的功能
first_screen_time, 首屏时间,及首屏内图片元素
white_screen_time,白屏时间
assetsTypes, 按资源类型划分,各类型包括:数量,大小,url详情
html_requests
html_size
jpeg_requests
jpeg_size
png_requests
png_size
css_requests
css_size
js_requests
js_size
gif_requests
gif_size
slowest_requests
...
domreadyEvent
onloadEvent
load_time, 总下载时间
timing
timing_appcache
timing_dns
timing_tcp
timing_ttfb
global_variables 全局变量
domains 域名总数及详情
max_requests_per_domain 包含最大请求数的域
webspeed, 植入webspeed监控脚本的性能数据,详情见http://webspeed.baidu.com
更多见: pagetimeline/modules
http://remotedebug.org/integrations/
https://github.com/macbre/phantomas
http://www.graphicsmagick.org/
网速模拟
并行
ubuntu下,chrome在切换user data directory时会弹出默认浏览器设置,暂时无法去除,导致时间相关性能指标为空
windows下,暂时不处理
FAQs
web performance analyze tool base on remote debugging protocol,fex
We found that pageinsight demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.