zoukankan      html  css  js  c++  java
  • mac-jmeter安装

    下载地址:
    java
    https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html

    jmeter
    http://jmeter.apache.org/download_jmeter.cgi

    环境变量
    如果已经配置好了环境变量,在终端(Terminal)输入echo $JAVA_HOME,echo $PATH,echo $CLASSPATH,里面包含正确的JDK路径,那就可以跳过这一步。
    JAVA_HOME:指向JDK的安装目录;
    PATH:指定命令搜索路径,设置好path变量后,就可以在任何目录下执行javac/java等工具了;
    CLASSPATH:指定类搜索路径。

    ~ jihan$ java -version
    java version "1.8.0_211"
    Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
    Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)
    ~ jihan$ /usr/libexec/java_home  -V
    Matching Java Virtual Machines (1):
        1.8.0_211, x86_64:	"Java SE 8"	/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home
    
    /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home
    

    vim .bash_profile 配置环境变量

     JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home
     PATH=$JAVA_HOME/bin:$PATH:.
     CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:.
     export JAVA_HOME
     export PATH
     export CLASSPATH
    

    在终端中输入source ~/.bash_profile,使这个文件立即生效。
    测试是否生效

    ~ jihan$ echo $CLASSPATH
    /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/lib/tools.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/lib/dt.jar:.
    ~ jihan$ echo $PATH
    /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home/bin
    ~ jihan$ echo $JAVA_HOME
    /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home
    

    启动jmeter软件

    jihan$ ls
    LICENSE		NOTICE		README.md	bin		docs		extras		lib		licenses	printable_docs
    :apache-jmeter-5.4.1 jihan$ **./bin/jmeter**
    ================================================================================
    Don't use GUI mode for load testing !, only for Test creation and Test debugging.
    For load testing, use CLI Mode (was NON GUI):
       jmeter -n -t [jmx file] -l [results file] -e -o [Path to web report folder]
    & increase Java Heap to meet your test requirements:
       Modify current env variable HEAP="-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m" in the jmeter batch file
    Check : https://jmeter.apache.org/usermanual/best-practices.html
    ================================================================================
    


    移动安装目录
    mv apache-jmeter-5.4.1 ~/Applications/apache-jmeter-5.4.1
    修改语言
    cd ~/Applications/apache-jmeter-5.4.1/ && vim bin/jmeter.properties

    重启完成修改!

  • 相关阅读:
    2020年SpringBoot面试题
    Java自带的性能监测工具
    jvm怎么判断哪些对象应该回收呢
    IDEA版本破解
    透彻解析Java类加载机制
    C# DataGridView使用BindingNavigator实现简单分页功能
    C# DataGridView使用自定义控件实现简单分页功能
    C# DataGridView自动保存列的宽度和位置
    C# DataGridView右键菜单自定义显示及隐藏列
    转:C# String为值类型还是引用类型
  • 原文地址:https://www.cnblogs.com/smallyi/p/14920620.html
Copyright © 2011-2022 走看看