zoukankan      html  css  js  c++  java
  • 【JMeter】(3)---MySQL压测

    JMeter---MySQL压测

    一、添加MySQL驱动jar包

           在测试计划(Test Plan)页面添加jar包

    二、添加MySQL连接配置

      添加线程组右击-->添加(add)-->配置元件(config element)-->JDBC connection configuration

    核心配置

         variable name for created pool(已创建池的变量名称)

         Max Number of connections : 最大连接数

         MAX wait :最大等待时间

         Auto Commit: 是否自动提交事务

         DataBase URL : 数据库连接地址 jdbc:mysql://127.0.0.1:3306/blog

         JDBC Driver Class : 数据库驱动,选择不同数据库对应的驱动

         username:数据库用户名

         password:数据库密码

    三、添加JDBC Request

           首先是添加线程组,然后右击-->添加-->Samplar-->JDBC Request

    参数讲解:(注意:上面的sql结尾不要加";")

           variable name of pool declared in JDBC connection configuration(注意:这里要和上面的variable name for created pool里面一致

          Query Type :查询类型

          parameter values: 参数值

          parameter types :参数类型

          variable names :sql执行结果变量名

          result variable names: 所有结果当做一个对象存储

          query timeouts:  查询超时时间

          handle results :处理结果集

     

     执行不同语句选择不同的Query Type

     数据库信息

    四、运行结果 

     

     说明数据库压测成功

     想太多,做太少,中间的落差就是烦恼。想没有烦恼,要么别想,要么多做。中校【1】

  • 相关阅读:
    图2(矩环问题)
    图1(八连块)
    恶补一下DP+背包专题(刷刷水题)L2
    food(洛谷P4040 [AHOI2014/JSOI2014]宅男计划)
    滑动窗口
    Lawnmower(洛谷 CF115B)
    Price(洛谷P4109 [HEOI2015]定价)
    逆序对
    矩阵
    1.25日考试
  • 原文地址:https://www.cnblogs.com/qdhxhz/p/9226598.html
Copyright © 2011-2022 走看看