Yslow on Nodejs server
1. 目的:用yslow测试某个页面的性能
2. 需求:返回yslow测试后的数据,显示在页面
方法一、 nodejs
需要把网址打包为har格式...
方法二、 phantomjs
步骤:
1. 安装phantomjs, brew phantomjs
2. 测试: phantomjs yslow.js --info basic http://www.baidu.com
3. 问题来了,报错:
TypeError: undefined is not an object (evaluating 'args.length')
phantomjs://code/yslow.js:5 in global code
原因是yslow官方提供的yslow.js 和 phantomjs2.x版本不兼容
解决办法:下载yslow git repo,替换phantomjs/controller.js 为这哥们修改后的: https://github.com/marcelduran/yslow/issues/172。
然后执行 make phantomjs 重新生成新的yslow.js
4. 回到第二步,done~
5. 可以用node里的 child_progress.spawn来获取命令行返回的数据
Yslow on Nodejs server的更多相关文章
- 用issnode+IIS来托管NodeJs Server
用issnode+IIS来托管NodeJs Server之一:安装篇 用issnode+IIS来托管NodeJs Server之二:移植 用issnode+IIS来托管NodeJs Server之三: ...
- week06 09 NodeJS Server as a RPCclient - jayson
nodeserver端的rpcclient 来调用后端backendserver端定义的add等方法 2个server连通 Make NodeJs as a client - Npm jayson 用 ...
- nodejs server启动写法
http://www.phpstudy.net/c.php/18720.html node不利用框架怎么实现对静态HTML.css.js的服务? 初学nodeJS,在使用nodejs构建静态文件服务器 ...
- nodejs server websocket
var WebSocketServer = require('websocket').server; var http = require('http'); var server = http.cre ...
- [freeCodeCamp] Start a Nodejs Server - Complete "Make it Modular"
_/home/ubuntu/.nvm/versions/node/v4.4.5/lib/node_modules/learnyounode/exer cises/make_it_modular/sol ...
- 阿里云部署nodejs服务器(windows)
花了大半个月做的网站终于要上线了,周围的同学们很多都在使用阿里云的服务器,我也入手了一台.考虑到自己不是很适应ubuntu的命令行界面,于是买了个windows的,上网搜了一下,似乎都是用linux来 ...
- nginx 各类网站设置 (laravel , thinkphp , nodejs , https)
基础部分设置 [root@centos ~]# vim /opt/nginx/conf/nginx.conf user www www;worker_processes auto;pid logs/n ...
- 记录一下,如何配置nodejs nginx的反向代理
本文是在mac下配置nodejs 在nginx下的反向代理 1.安装nodejs,之前就安装了. 2.安装nginx ,我采用的直接源码安装 3.进入 /usr/local/nginx/conf 目录 ...
- CentOS安装Nginx,并配置nodejs反向代理
安装介绍 安装位置:/usr/local/nginx nginx安装包下载地址:http://nginx.org/download/nginx-1.7.11.tar.gz 安装依赖软件 安装nginx ...
随机推荐
- sqlite学习笔记之sqlite3_open函数的使用
作者:朱金灿 来源:http://blog.csdn.net/clever101 打开sqlite数据库需要用到sqlite3_open函数,但是sqlite3_open函数的第一个参数是数据库文件的 ...
- 初学layer
canvas是支持图层layer渲染这种技术的,canvas默认就有一个layer,当我们平时调用canvas的各种drawXXX()方法时,其实是把所有的东西都绘制到canvas这个默认的layer ...
- 移动web——bootstrap响应式轮播图
基本介绍 1.bootstrap有轮播图的模板,我们只需要改动下就行. 2.这里我们将介绍桌面版本和移动版本最后是综合版本 桌面版本 1.这里的图片设置是有窍门的,不再去添加img标签,而是作为a标签 ...
- MaskRCNN路标:TensorFlow版本用于抠图
MaskRCNN用于检测路标,作为更详细的目标检测,用以得到更精准的额路标位置,路标的几何中心点,用于构建更为精准的拓扑地图,减少构图误差. 抠图工具已经完成,把框抠出来,用0值表示背景. pytho ...
- Centos6.7 编译安装 MySQL教程
Centos6.7 编译安装 MySQL # 安装依赖包 [root@localhost ~]# yum -y install gcc gcc-c++ autoconf* automake* zlib ...
- rxswift-self.usernameTF.rx.text.orEmpty.map
self.usernameTF.rx.text.orEmpty.map 一堆类型转化+数据处理的操作 self.usernameTF.rx:将textfiled用Reactive封装: .text:监 ...
- Python 之re正则表达式
- Java中的接口详解
接口 是Java语言中一种引用类型,是方法的集合,如果说类的内部封装了成员变量.构造方法和成员方法,那么接口的内部主要就是封装了方法,包含抽象方法(JDK 7及以前),默认方法和静态方法(JDK 8) ...
- profiler-gpu分析记录
查看 Android 手机芯片信息下面以 夜神模拟器为例 D:\cmderλ adb devices # 1. 列出安卓设备List of devices attached127.0.0.1:6200 ...
- P2884 [USACO07MAR]每月的费用Monthly Expense
题目描述 Farmer John is an astounding accounting wizard and has realized he might run out of money to ru ...