charbench测试用例
charbench -c ../configs/SOE_Server_Side_V2.xml -cs //127.0.0.1/st -a -v "users,tpm,tps,trans,dml" -rr 1 -rt "00:01" -min 5 -max 5 -r "test-st.xml"
配置参数含义:
-c 使用配置文件:SOE_Server_Side_V2.xml
-cs 指定数据库连接字符串://127.0.0.1/st
-a 自动运行
-v 显示运行统计值(使用逗号分隔,不能有空格)
Users:用户数;
Tpm:每分钟事务数;
Tps:每秒事务数;
Trans:事务信息,对应swingbench的Transactions页签中的Short Name
Dml:包括:查询、插入、更新、删除、提交
-r 指定测试结果文件名称,默认为results.xml
-rr 控制台刷新显示频率(单位:秒),默认每秒显示一次;
-rt 设置负载运行时间,格式:hh:mm.sec,默认一直运行;
-min<ms> 设置内部事务最小思考时间;
-max<ms> 设置内部事务最大思考时间;
-vo 输出测试结果到文件,默认输出到控制台;
charbench详细配置参数
通过charbench -h
命令,可以查看详细配置参数:
charbench.bat -h
usage: parameters:
-D <variable=value> use value for given environment variable
-a run automatically
-be <stopafter> end recording statistics after. Value is in
the form hh:mm.sec
-bg indicate that charbench will be run in the
background
-bs <startafter> start recording statistics after. Value is
in the form hh:mm.sec
-c <filename> specify config file
-cf <username> the location of a crendentials file for
Oracle Cloud (ADW/ATP./ExaExp)
-co <hostname> specify/override coordinator in
configuration file.
-com <comment> specify comment for this benchmark run (in
double quotes)
-cpuloc <hostname > specify/overide location/hostname of the
cpu monitor.
-cpupass specify/overide os password of the user
used to monitor cpu.
-cpuuser specify/overide os username of the user
used to monitor cpu.
-cs <connectstring> override connect string in configuration
file
-dbap <password> the password of admin user (used for
collecting DB Stats)
-dbau <username> the username of admin user (used for
collecting DB stats)
-debug turn on debugging. Written to standard out
-debugf <debugfile> turn on debugging. Write output to
<debugfile> defaults to debug.log.
-debugfine turn on finest level of debugging
-di <shortname(s)> disable transactions(s) by short name,
comma separated
-dt <drivertype> override driver type in configuration file
(thin, oci, ttdirect, ttclient)
-dumptx output transaction response times to file
-dumptxdir <directory name> directory for transaction response times
files
-en <shortname(s)> enable transactions(s) by short name, comma
separated
-env display environment configuration
-f force data collection and run termination
regardless of state
-g <groupID> distributed group identifier
-h,--help print this message
-i run interactively (default)
-intermax <milliseconds> override minimum inter transaction sleep
time (default = 0)
-intermin <milliseconds> override minimum inter transaction sleep
time (default = 0)
-ld <milliseconds> specify/overide the logon delay
(milliseconds)
-max <milliseconds> override maximum intra transaction think
time in configuration file
-min <milliseconds> override minimum intra transaction think
time in configuration file
-mr produce a mini report of the results of a
run
-mt <maxtrans> maximum tasks to be executed before
terminating run
-nr don't produce a results file at the end of
a run
-p <password> override password in configuration file
-r <filename> specify results file
-rr specify/overide refresh rate for charts in
secs
-rt <runtime> specify/overide run time for the benchmark.
Value is in the form hh:mm.sec
-s run silent
-stats <stats level> specify level result stats detail (full or
simple)
-u <username> override username in configuration file
-uc <user count> override user count in configuration file.
-v <options> display run statistics (vmstat/sar like
output), options include (comma separated no spaces).
trans|cpu|disk|dml|errs|tpm|tps|users|resp|vresp|tottx|trem
-ver display version and exit
-vo <verboseOutput> output file for verbose output (defaults to
stdout)
-wc wait until all session have disconnected
from the database