Jmeter配置

第一步:

1. 打开注册表regedit
 2. 在HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
 3. 右键Parameters,添加新的DWORD(win32),名字为MaxUserPort和TcpTimedWaitDelay
 4. 分别输入数值数据为65534和30,基数选择十进制;以增大可分配的tcp连接端口数、减小处于TIME_WAIT状态的连接的生存时间
 5. 重启电脑

第二步:

1.切换到bin目录下,找到jmeter.bat文件,双击运行

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
以下是jmeter配置DM的步骤: 1. 下载DM8的JDBC驱动包,将其放置在jmeter的lib目录下。 2. 在jmeter中添加一个线程组。 3. 在该线程组下添加JDBC Connection Configuration配置元件,配置DM8数据库的连接信息,包括JDBC驱动类、连接URL、用户名和密码等。 4. 在该线程组下添加JDBC Request配置元件,配置SQL语句和参数等信息。 5. 在该线程组下添加监听器,例如View Results Tree,查看测试结果。 下面是一个示例的jmeter配置DM的脚本: ```xml <?xml version="1.0" encoding="UTF-8"?> <jmeterTestPlan version="1.2" properties="2.9" jmeter="5.4.1"> <hashTree> <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true"> <stringProp name="TestPlan.comments"></stringProp> <boolProp name="TestPlan.functional_mode">false</boolProp> <boolProp name="TestPlan.serialize_threadgroups">false</boolProp> <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> <collectionProp name="Arguments.arguments"/> </elementProp> <stringProp name="TestPlan.user_define_classpath"></stringProp> </TestPlan> <hashTree> <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true"> <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true"> <boolProp name="LoopController.continue_forever">false</boolProp> <intProp name="LoopController.loops">1</intProp> </elementProp> <stringProp name="ThreadGroup.num_threads">1</stringProp> <stringProp name="ThreadGroup.ramp_time">1</stringProp> <longProp name="ThreadGroup.start_time">1630440000000</longProp> <longProp name="ThreadGroup.end_time">1630440000000</longProp> <boolProp name="ThreadGroup.scheduler">false</boolProp> <stringProp name="ThreadGroup.duration"></stringProp> <stringProp name="ThreadGroup.delay"></stringProp> </ThreadGroup> <hashTree> <JDBCConnectionConfiguration guiclass="JDBCConnectionConfigurationGui" testclass="JDBCConnectionConfiguration" testname="JDBC Connection Configuration" enabled="true"> <stringProp name="dataSource">jdbc</stringProp> <stringProp name="poolMax">5</stringProp> <stringProp name="timeout">10000</stringProp> <stringProp name="trimInterval">60000</stringProp> <stringProp name="autocommit">false</stringProp> <stringProp name="transactionIsolation">DEFAULT</stringProp> <stringProp name="keepAlive">true</stringProp> <stringProp name="preinit">false</stringProp> <stringProp name="connectionAge">5000</stringProp> <stringProp name="checkQuery">Select 1</stringProp> <stringProp name="dbUrl">jdbc:dm://localhost:5236</stringProp> <stringProp name="driver">dm.jdbc.driver.DmDriver</stringProp> <stringProp name="username">username</stringProp> <stringProp name="password">password</stringProp> </JDBCConnectionConfiguration> <hashTree/> <JDBCRequest guiclass="TestBeanGUI" testclass="JDBCRequest" testname="JDBC Request" enabled="true"> <stringProp name="dataSource">jdbc</stringProp> <stringProp name="queryType">Select Statement</stringProp> <stringProp name="query">select * from table_name</stringProp> <stringProp name="queryArguments"></stringProp> <stringProp name="queryArgumentsTypes"></stringProp> <stringProp name="variableNames"></stringProp> <stringProp name="resultVariable"></stringProp> <stringProp name="resultSetHandler">Store as String</stringProp> <boolProp name="queryTimeout">false</boolProp> <stringProp name="queryTimeoutDuration"></stringProp> <stringProp name="ResultType">Auto</stringProp> </JDBCRequest> <hashTree/> <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> <boolProp name="ResultCollector.error_logging">false</boolProp> <objProp> <name>saveConfig</name> <value class="SampleSaveConfiguration"> <time>true</time> <latency>true</latency> <timestamp>true</timestamp> <success>true</success> <label>true</label> <code>true</code> <message>true</message> <threadName>true</threadName> <dataType>true</dataType> <encoding>false</encoding> <assertions>true</assertions> <subresults>true</subresults> <responseData>false</responseData> <samplerData>false</samplerData> <xml>false</xml> <fieldNames>true</fieldNames> <responseHeaders>false</responseHeaders> <requestHeaders>false</requestHeaders> <responseDataOnError>false</responseDataOnError> <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> <assertionsResultsToSave>0</assertionsResultsToSave> <bytes>true</bytes> <sentBytes>true</sentBytes> <url>true</url> <threadCounts>true</threadCounts> <idleTime>true</idleTime> <connectTime>true</connectTime> </value> </objProp> <stringProp name="filename"></stringProp> </ResultCollector> <hashTree/> </hashTree> </hashTree> </hashTree> </jmeterTestPlan> ```

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Climbing-pit

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值