0

I am using Mac OS X, on terminal i did:

$ sudo npm install node-siege 

to install siege. And i can see node-siege folder created and installed in my folder. But when i run anything with siege, it gives me -bash: siege.config: command not found not very sure why. siege.config, or any command with siege. It gives me the command not found.

Edit I installed Siege now it is in my folder, and i can run it.

I have a siege.test.js

  var siege = require('../../siege')

    // Assuming i supposed to change the script below to the directory path then + the file to run??
// For example  var siege = require(Localhost/testfolder+'/testthisfile.js')

//siege(__dirname + '/app.js')
siege()
  .host('localhost')
  .on(3000)
  .concurrent(30)
  .for(10000).times
  .get('/')
  .post('/')
  .attack()
John
  • 983
  • 1
  • 13
  • 31
  • this is because somewhere in the install script there must be a command `siege.config ` – fedorqui May 11 '15 at 14:16
  • I also did siege -c10 http://localhost:3000, or any command with siege, it also returns command not found as well. Not sure what to do at all. – John May 11 '15 at 14:27

2 Answers2

0

node-siege is just a wrapper around the command line program called siege.

In order to use node-siege in your node.js scripts, you need to install the siege command line tool first. How you do that depends on your OS, but on *nix it's typically available via your favorite package manager.

mscdex
  • 104,356
  • 15
  • 192
  • 153
  • 1
    Ahh, i managed to get it working, but i am not sure why i dont have data for concurrency etc... I see on this tutorial they have data on concurrency, transaction rate and failed transaction etc. I only have the successful request, the rps time, and response time min,max and avg, but no other data shown on their siege. codeforgeek.com/2015/01/nodejs-mysql-tutorial – John May 11 '15 at 15:57
0

You have to install Siege with a package manager (example: brew install Siege)

Then create a init file siege.config

In order to see benchmarks (concurrency, transaction rate and failed transaction) you can set -r for number of reps so that it will only run the siege once.

siege -c100 -r1 http://localhost:3000/

https://linux.die.net/man/1/siege

Christa
  • 61
  • 11