Update tool/examples to allow for naive load testing (#152)

This commit is contained in:
C Cirello
2016-10-13 00:03:25 +02:00
committed by Seif Lotfy سيف لطفي
parent 006c01c97e
commit 5a1d9d4825
2 changed files with 26 additions and 12 deletions

View File

@@ -1,6 +1,11 @@
#!/bin/bash
HOST="${1:-localhost:8080}"
REQ="${2:-1}"
curl -H "Content-Type: application/json" -X POST -d '{
"app": { "name":"myapp" }
}' http://localhost:8080/v1/apps
}' http://$HOST/v1/apps
curl -H "Content-Type: application/json" -X POST -d '{
"route": {
@@ -8,9 +13,11 @@ curl -H "Content-Type: application/json" -X POST -d '{
"path":"/hello-async",
"image":"iron/hello"
}
}' http://localhost:8080/v1/apps/myapp/routes
curl -H "Content-Type: application/json" -X POST -d '{
"name":"Johnny"
}' http://localhost:8080/r/myapp/hello-async
}' http://$HOST/v1/apps/myapp/routes
for i in `seq 1 $REQ`;
do
curl -H "Content-Type: application/json" -X POST -d '{
"name":"Johnny"
}' http://$HOST/r/myapp/hello-async
done;

View File

@@ -1,6 +1,11 @@
#!/bin/bash
HOST="${1:-localhost:8080}"
REQ="${2:-1}"
curl -H "Content-Type: application/json" -X POST -d '{
"app": { "name":"myapp" }
}' http://localhost:8080/v1/apps
}' http://$HOST/v1/apps
curl -H "Content-Type: application/json" -X POST -d '{
"route": {
@@ -8,9 +13,11 @@ curl -H "Content-Type: application/json" -X POST -d '{
"path":"/hello-sync",
"image":"iron/hello"
}
}' http://localhost:8080/v1/apps/myapp/routes
curl -H "Content-Type: application/json" -X POST -d '{
"name":"Johnny"
}' http://localhost:8080/r/myapp/hello-sync
}' http://$HOST/v1/apps/myapp/routes
for i in `seq 1 $REQ`;
do
curl -H "Content-Type: application/json" -X POST -d '{
"name":"Johnny"
}' http://$HOST/r/myapp/hello-sync
done;