mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
Update tool/examples to allow for naive load testing (#152)
This commit is contained in:
committed by
Seif Lotfy سيف لطفي
parent
006c01c97e
commit
5a1d9d4825
@@ -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;
|
||||
@@ -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;
|
||||
Reference in New Issue
Block a user