summaryrefslogtreecommitdiffstats
path: root/vcpe_beijing/vcpe/test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'vcpe_beijing/vcpe/test.sh')
-rw-r--r--vcpe_beijing/vcpe/test.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/vcpe_beijing/vcpe/test.sh b/vcpe_beijing/vcpe/test.sh
new file mode 100644
index 0000000..2849b4f
--- /dev/null
+++ b/vcpe_beijing/vcpe/test.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+#开始时间
+begin=$(date +%s)
+
+count=$1
+rsnum=$2
+cishu=$(expr $count / $rsnum)
+
+for ((i=0; i<$cishu;))
+do
+ start_num=$(expr $i \* $rsnum + 1)
+ end_num=$(expr $start_num + $rsnum - 1)
+ for j in `seq $start_num $end_num`
+ do
+ ./echo.sh $j &
+ sleep 0.01
+ done
+ wait
+ i=$(expr $i + 1)
+done
+
+#结束时间
+end=$(date +%s)
+spend=$(expr $end - $begin)
+echo "花费时间为$spend秒"