zoukankan      html  css  js  c++  java
  • 一个批量转换jtl文件的shell

       最近在项目中遇到了批量转换jmeter测试结果jtl的问题,整了一个脚本,记录如下:

       

    #bin/sh
    filelist=`ls jtl`   # 将jtl目录的所有文件列表读取并存入变量
    for file in $filelist  #遍历处理各个文件
    do
         #文件名形如 test2ad.jtl,获取.字符的位置
       index=`expr index $file .`
    #.字符向前一位为有效字符    index
    =$index-1
    #截取test2ad.jtl中的test2ad 存入csv变量    csv
    =${file:0:$index}
    #指定JMeterPluginsCMD.sh和jtl文件的绝对路径    java_jmeter/lib/ext/
    JMeterPluginsCMD.sh --generate-csv jieguo/csv/$csv/TransactionsPerSecond.csv --input-jtl jieguo/$file --granulation 1000 --plugin-type TransactionsPerSecond   java_jmeter/lib/ext/JMeterPluginsCMD.sh --generate-csv jieguo/csv/$csv/ResponseTimesOverTime.csv --input-jtl jieguo/$file --granulation 1000 --plugin-type ResponseTimesOverTime    java_jmeter/lib/ext/JMeterPluginsCMD.sh --generate-png jieguo/csv/$csv/TransactionsPerSecond.png --input-jtl jieguo/$file --granulation 1000 --plugin-type TransactionsPerSecond java_jmeter/lib/ext/JMeterPluginsCMD.sh --generate-png jieguo/csv/$csv/ResponseTimesOverTime.png --input-jtl jieguo/$file --granulation 1000 --plugin-type ResponseTimesOverTime done
  • 相关阅读:
    CSS 基础语法
    标签
    HDU 5487 Difference of Languages BFS
    HDU 5473 There was a kingdom 凸包 DP
    HDU 5468 Puzzled Elena 莫比乌斯反演
    BNU 3692 I18n 模拟
    补题列表
    POJ 3241 曼哈顿距离最小生成树 Object Clustering
    UVa 1309 DLX Sudoku
    CodeForces Round #320 Div2
  • 原文地址:https://www.cnblogs.com/onmyway20xx/p/4301714.html
Copyright © 2011-2022 走看看