-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotes
More file actions
140 lines (89 loc) · 3.32 KB
/
notes
File metadata and controls
140 lines (89 loc) · 3.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
apache bench -----
Get installed with apache
ab -t2 -c 100 -g out.data http://192.168.150.110:10001/requestdetails
# post_loc.txt contains the json you want to post
# -p means to POST it
# -H adds an Auth header (could be Basic or Token)
# -T sets the Content-Type
# -c is concurrent clients
# -n is the number of requests to run in the test
ab -t1 -n 100 -c 7 -H 'Content-Type:application/json' -C 'cookie_name_1=cookie_value_1;cookie_name_2=cookie_value_2;' -p data1.json -w http://192.168.150.110:23456/requestdetails
Pylot ------
mkdir pylot
cd pylot/
wget http://pylt.googlecode.com/files/pylot_1.26.zip .
sudo yum install unzip
sudo pip install -U numpy
sudo pip install -U python-dev
sudo yum install numpy-1.7.1-10.el7.src.rpm
sudo yum install numpy
sudo yum install Matplotlib
sudo yum install python-matplotlib
unzip pylot_1.26.zip
cd pylot_1.26
python run.py [options] args
ls results/results_2015.11.07_03.34.06/results.html
Siege ------
mkdir siege
cd siege/
wget http://download.joedog.org/siege/siege-latest.tar.gz
tar -zxvf siege-latest.tar.gz
cd siege-*/
./configure
make
sudo make install
siege http://192.168.150.110:10001/requestdetails --time=5S --log=/tmp/siege.log
ls /tmp/siege.log
Working post example
siege --time=1S --log=/tmp/siege.log -H 'Content-Type:application/json' "http://192.168.150.110:23456/requestdetails POST <./data1.json" -c 5 -v
siege --time=1S --log=/tmp/siege.log -H 'Content-Type:application/json' -f urls.txt -c 5 -v
siege --time=2S --log=/tmp/siege.log -H 'Content-Type:application/json' --header="Cookie: rbkSignon=XXXXX" -f urls.txt -c 5 -v
jmeter ----
brew install jmeter --with-plugins
wget http://apache.mirrors.tds.net//jmeter/binaries/apache-jmeter-2.13.tgz
tar zxvf apache-jmeter-2.13.tgz
cd apache-jmeter-2.13
apache-jmeter-2.13/bin/jmeter.sh -n -t your_script.jmx
jmeter -n -t PerformanceTest.jmx -Jusers=4 -Jduration=300
example:
sh jmeter.sh -n -p user.properties -t /smtp_test_param.jmx -l /reports/smtp_test_result.jtl -JUSERNAME=username -JPASSWORD=password -JUSERS=5 -JHOWMUCHTIMESTORUN=4 -JDURATION=20 -JENV=staging -JFILE=content.txt
Gatling ---
Install Java ----
./jmeter
ls
cd bin/
./jmeter
java –v
which java
java -version
ls /usr/java/jdk1.8.0_11/
which java
ls -l /usr/bin/java
sudo alternatives --config java
which java
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-2.b17.el7_1.x86_64/jre/
export CLASSPATH=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-2.b17.el7_1.x86_64/jre/lib/
export CLASSPATH=$JAVA_HOME/jre/lib/ext:$JAVA_HOME/lib/tools.jar
echo CLASSPATH
echo $JAVA_HOME
export CLASSPATH=$JAVA_HOME/jre/lib/ext:$JAVA_HOME/lib/tools.jar
export CLASSPATH=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-2.b17.el7_1.x86_64/jre/jre/lib/ext:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-2.b17.el7_1.x86_64/jre/jre/lib/
ls -l /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-2.b17.el7_1.x86_64/jre/jre/lib/ext
ls -l /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-2.b17.el7_1.x86_64/jre/lib/ext/
export CLASSPATH=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-2.b17.el7_1.x86_64/jre/lib/ext:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-2.b17.el7_1.x86_64/jre/lib/
echo $CLASSPATH
java
pwd
sh jmeter.sh
ls
vim ~/.bash_history
exit
vim ~/.bash_history
ls
vim notes
ls
cd jmeter/
jmeter -n -t your_script.jmx
ls
cd apache-jmeter-2.13/bin/jmeter.sh -n -t your_script.jmx
v