[ANN] siege.js by kissjs.org publish 0.0.2
 发布于 13 年前  作者 guilin  6871 次预览  最后一次回复是 13 年前  来自  

siege.js is a http benchmark module.

features:

  • benchmark with keep alive connection, (useful on mac os)
  • colorful report
  • multiple task define
  • cookie support (>= 0.0.2)

example:

siege()
  .on(3000)
  .for(10000).times
  .get('/')
  .attack()

for a nodejs app.js, which module.exports = function(req, res), you can use siege start your server, before benchmark, and close server after benchmark.

siege(__dirname + '/app.js')
  .on(4000)
  .withCookie
  .for(10000).times
  .concurrent(100)
  .get('/set-cookie')
  .get('/get-cookie')
  .get('/').withoutCookie
  .attack() 

enjoy it.

by kissjs.org.

We are looking for collaborators.

11 回复
pittmak

语法很简洁漂亮!

fengmk2

可以直接贴到原文上啊,哈哈,再加个npm install siege安装方式会更好。

fengmk2

已经在使用,不错。

hpf1908

已测试,方便多了

guilin

@suqian npm有的. 帮宣传啊.

guilin

在maillist里看见你了

guilin

@suqian 哦, 你是说原创文章版块啊, 好像发帖时没有选版块的地方.

pittmak

@guilin 是的,我在!

DoubleSpout

多搞几台可以ddos攻击吗?

guilin

不可以, ddos 是要靠连接数来攻击的