mirror of
https://gitee.com/TarsCloud/TarsCpp.git
synced 2024-12-22 22:16:38 +08:00
add bat
This commit is contained in:
parent
5c90bd38b9
commit
ac7c68ec0f
8
examples/scripts/run-all.bat
Normal file
8
examples/scripts/run-all.bat
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
echo "run-all.bat"
|
||||
|
||||
..\\examples\\scripts\\run-quick-start.bat
|
||||
..\\examples\\scripts\\run-http.bat
|
||||
..\\examples\\scripts\\run-co.bat
|
||||
..\\examples\\scripts\\run-push.bat
|
||||
|
44
examples/scripts/run-co.bat
Normal file
44
examples/scripts/run-co.bat
Normal file
@ -0,0 +1,44 @@
|
||||
|
||||
echo "run-co.bat"
|
||||
|
||||
|
||||
killall -2 CoroutineDemoAServer.exe
|
||||
|
||||
sleep 1
|
||||
|
||||
echo "start server: .\\bin\\Release\\CoroutineDemoAServer.exe --config=..\\examples\\CoroutineDemo\\AServer\\config.conf &"
|
||||
|
||||
.\\bin\\Release\\CoroutineDemoAServer.exe --config=..\\examples\\CoroutineDemo\\AServer\\config.conf &
|
||||
|
||||
#-------------------------------------------------------------------------------------------------------
|
||||
|
||||
killall -2 CoroutineDemoBServer.exe
|
||||
|
||||
sleep 1
|
||||
|
||||
echo "start server: .\\bin\\Release\\CoroutineDemoBServer.exe --config=..\\examples\\CoroutineDemo\\BServer\\config.conf &"
|
||||
|
||||
.\\bin\\Release\\CoroutineDemoBServer.exe --config=..\\examples\\CoroutineDemo\\BServer\\config.conf &
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------------------------------
|
||||
sleep 1
|
||||
|
||||
echo "client: .\\bin\\CoroutineDemoClient"
|
||||
|
||||
.\\bin\\Release\\CoroutineDemoClient.exe 2 10000 0
|
||||
|
||||
.\\bin\\Release\\CoroutineDemoClient.exe 2 10000 1
|
||||
|
||||
.\\bin\\Release\\testCoro.exe 1000
|
||||
|
||||
.\\bin\\Release\\testParallelCoro.exe 1000
|
||||
|
||||
#-------------------------------------------------------------------------------------------------------
|
||||
|
||||
sleep 1
|
||||
|
||||
killall -2 CoroutineDemoAServer.exe
|
||||
killall -2 CoroutineDemoBServer.exe
|
||||
|
||||
|
21
examples/scripts/run-http.bat
Normal file
21
examples/scripts/run-http.bat
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
echo "run-http.bat"
|
||||
|
||||
killall -2 HttpServer.exe
|
||||
sleep 1
|
||||
|
||||
echo "start server: .\\bin\\Release\\HttpServer.exe --config=..\\examples\\HttpDemo\\HttpServer\\config.conf &"
|
||||
|
||||
.\\bin\\Release\\HttpServer.exe --config=..\\examples\\HttpDemo\\HttpServer\\config.conf &
|
||||
|
||||
sleep 1
|
||||
|
||||
echo "client: .\\bin\\Release\\HttpClient.exe"
|
||||
|
||||
.\\bin\\Release\\HttpClient.exe 2 10000
|
||||
|
||||
sleep 1
|
||||
|
||||
killall -2 HttpServer.exe
|
||||
|
||||
|
21
examples/scripts/run-push.bat
Normal file
21
examples/scripts/run-push.bat
Normal file
@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "run-push.bat"
|
||||
|
||||
killall -2 PushServer.exe
|
||||
sleep 1
|
||||
|
||||
echo "start server: .\\bin\\Release\\PushServer.exe --config=..\\examples\\PushDemo\\PushServer\\config.conf &"
|
||||
|
||||
.\\bin\\Release\\PushServer.exe --config=..\\examples\\PushDemo\\PushServer\\config.conf &
|
||||
|
||||
sleep 3
|
||||
|
||||
#-------------------------------------------------------------------------------------------------------
|
||||
|
||||
echo "client: .\\bin\\Release\\PushClient.exe"
|
||||
|
||||
.\\bin\\Release\\PushClient.exe 5
|
||||
|
||||
killall -2 PushServe.exe
|
||||
|
32
examples/scripts/run-quick-start.bat
Normal file
32
examples/scripts/run-quick-start.bat
Normal file
@ -0,0 +1,32 @@
|
||||
|
||||
echo "run-quick-start.bat"
|
||||
|
||||
killall -2 QuickStartDemo.exe ProxyServer.exe
|
||||
sleep 1
|
||||
|
||||
echo "start server: .\\bin\\Release\\QuickStartDemo.exe --config=..\\examples\\QuickStartDemo\\HelloServer\\Server\\config.conf &"
|
||||
|
||||
.\\bin\\Release\\QuickStartDemo.exe --config=..\\examples\\QuickStartDemo\\HelloServer\\Server\\config.conf &
|
||||
.\\bin\\Release\\ProxyServer.exe --config=..\\examples\\QuickStartDemo\\ProxyServer\\Server\\config.conf &
|
||||
|
||||
sleep 3
|
||||
|
||||
echo "client: .\\bin\\Release\\QuickStartDemoClient.exe"
|
||||
|
||||
.\\bin\\Release\\QuickStartDemoClient.exe --count=100000 --call=sync --thread=2 --buffersize=100 --netthread=2
|
||||
|
||||
.\\bin\\Release\\QuickStartDemoClient.exe --count=100000 --call=async --thread=2 --buffersize=100 --netthread=2
|
||||
|
||||
.\\bin\\Release\\QuickStartDemoClient.exe --count=100000 --call=synctup --thread=2 --buffersize=100 --netthread=2
|
||||
|
||||
.\\bin\\Release\\QuickStartDemoClient.exe --count=100000 --call=asynctup --thread=2 --buffersize=100 --netthread=2
|
||||
|
||||
echo "client: .\\bin\\Release\\ProxyServerClient.exe"
|
||||
|
||||
.\\bin\\Release\\ProxyServerClient.exe
|
||||
|
||||
sleep 2
|
||||
|
||||
killall -2 ProxyServer.exe QuickStartDemo.exe
|
||||
|
||||
|
BIN
servant/script/busybox.exe
Normal file
BIN
servant/script/busybox.exe
Normal file
Binary file not shown.
57
servant/script/cpp_taf_server.sh
Normal file
57
servant/script/cpp_taf_server.sh
Normal file
@ -0,0 +1,57 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ $# -lt 3 ]
|
||||
then
|
||||
echo "<Usage: $0 App Server Servant>"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
APP=$1
|
||||
SERVER=$2
|
||||
SERVANT=$3
|
||||
|
||||
if [ "$SERVER" == "$SERVANT" ]
|
||||
then
|
||||
echo "Error!(ServerName == ServantName)"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
if [ ! -d $APP/$SERVER ]
|
||||
then
|
||||
echo "[mkdir: $APP/$SERVER]"
|
||||
mkdir -p $APP/$SERVER
|
||||
fi
|
||||
|
||||
echo "[create server: $APP.$SERVER ...]"
|
||||
|
||||
DEMO_PATH=/usr/local/taf/cpp/script/demo
|
||||
|
||||
make cleanall -C $DEMO_PATH
|
||||
|
||||
cp $DEMO_PATH/* $APP/$SERVER/
|
||||
|
||||
cd $APP/$SERVER/
|
||||
|
||||
SRC_FILE="DemoServer.h DemoServer.cpp DemoServantImp.h DemoServantImp.cpp DemoServant.jce makefile"
|
||||
|
||||
for FILE in $SRC_FILE
|
||||
do
|
||||
cat $FILE | sed "s/DemoServer/$SERVER/g" > $FILE.tmp
|
||||
mv $FILE.tmp $FILE
|
||||
|
||||
cat $FILE | sed "s/DemoApp/$APP/g" > $FILE.tmp
|
||||
mv $FILE.tmp $FILE
|
||||
|
||||
cat $FILE | sed "s/DemoServant/$SERVANT/g" > $FILE.tmp
|
||||
mv $FILE.tmp $FILE
|
||||
done
|
||||
|
||||
mv DemoServer.h ${SERVER}.h
|
||||
mv DemoServer.cpp ${SERVER}.cpp
|
||||
mv DemoServantImp.h ${SERVANT}Imp.h
|
||||
mv DemoServantImp.cpp ${SERVANT}Imp.cpp
|
||||
mv DemoServant.jce ${SERVANT}.jce
|
||||
|
||||
cd ../../
|
||||
|
||||
echo "[done.]"
|
Loading…
Reference in New Issue
Block a user