• beanshell自定义聚合报告时分线程组阶段展示


    假设现在一共会加载100个线程,期望聚合报告中分别展示1-20,20-40,40-60,60-80的四个阶段的线程并发性能数据,而不是总体的统计数据

    beanshell脚本,具体内容:

    import org.apache.jmeter.threads.JMeterContextService;
    int num = JMeterContextService.getNumberOfThreads();
    System.out.println("当前活动线程数=" +num);
    if(num<=20){
    System.out.println("线程区间1-20");
    vars.put("Thread","线程数1-20");
    }
    ?
    else if (num>20&&num<=40){
    System.out.println("线程区间20-40");
    vars.put("Thread","线程数20-40");
    }
    else if(num>40&&num<=60){
    System.out.println("线程区间40-60");
    vars.put("Thread","线程数40-60");
    }
    else {
    System.out.println("线程区间60-100");
    vars.put("Thread","线程数60-100");
    }

    假设现在一共会加载100个线程,我期望聚合报告中分别展示1-20,20-40,40-60,60-80的四个阶段的线程并发性能数据,而不是一共总体的统计数据

    import org.apache.jmeter.threads.JMeterContextService;int num = JMeterContextService.getNumberOfThreads();System.out.println("当前活动线程数=" +num);if(num<=20){System.out.println("线程区间1-20");vars.put("Thread","线程数1-20");}?else if (num>20&&num<=40){System.out.println("线程区间20-40");vars.put("Thread","线程数20-40");}else if(num>40&&num<=60){System.out.println("线程区间40-60");vars.put("Thread","线程数40-60");}else {System.out.println("线程区间60-100");vars.put("Thread","线程数60-100");}



  • 相关阅读:
    innodb-mvcc
    5.7-mysql不同隔离级别下执行sql的上锁情况-building
    shardingsphere自定义分分片
    shardingsphere自定义分布式主键如何配置
    线程池源码ThreadPoolExecutor分析
    一些知识的总结
    账户余额的批量入账与扣账实现
    jstack
    Java——总结
    Java——重写
  • 原文地址:https://www.cnblogs.com/QiKa/p/12715726.html
Copyright © 2020-2023  润新知