Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
W23123 2020-03-24 16:14:42 +08:00
commit a72ba55141
4 changed files with 64 additions and 69 deletions

View File

@ -84,7 +84,7 @@ public class JtlResolver {
RequestStatistics requestStatistics = new RequestStatistics();
requestStatistics.setRequestLabel(label);
requestStatistics.setSamples(index+"");
requestStatistics.setSamples(index);
DecimalFormat df = new DecimalFormat("0.00");
String s = df.format((float)sumElapsed/index);
requestStatistics.setAverage(s+"");

View File

@ -6,7 +6,7 @@ public class RequestStatistics {
private String requestLabel;
/**压测请求数*/
private String samples;
private Integer samples;
/**平均响应时间*/
private String average;
@ -43,11 +43,11 @@ public class RequestStatistics {
this.requestLabel = requestLabel;
}
public String getSamples() {
public Integer getSamples() {
return samples;
}
public void setSamples(String samples) {
public void setSamples(Integer samples) {
this.samples = samples;
}

View File

@ -255,8 +255,8 @@ public class JtlTest {
RequestStatistics sceneResult = new RequestStatistics();
sceneResult.setRequestLabel(label);
sceneResult.setSamples(index+"");
sceneResult.setAverage(sumElapsed/index+"");
sceneResult.setSamples(index);
// sceneResult.setAverage(sumElapsed/index);
sceneResult.setTp90(elapsedList.get(tp90)+"");
sceneResult.setTp95(elapsedList.get(tp95)+"");
sceneResult.setTp99(elapsedList.get(tp99)+"");

View File

@ -2,78 +2,73 @@
<div>
<el-table
:data="tableData"
stripe
border
style="width: 100%"
:default-sort = "{prop: 'samples'}"
show-summary
:default-sort = "{prop: 'samples', order: 'descending'}"
>
<el-table-column
prop="requestLabel"
label="Element Label"
fixed
width="450"
>
<el-table-column label="Requests" fixed width="450" align="center">
<el-table-column
prop="requestLabel"
label="Label"
width="450"/>
</el-table-column>
<el-table-column
prop="samples"
label="Samples"
width="150"
sortable>
<el-table-column label="Executions" align="center">
<el-table-column
prop="samples"
label="Samples"
sortable
width="110"
/>
<el-table-column
prop="errors"
label="Error%"
align="center"
fixed="right"/>
</el-table-column>
<el-table-column
prop="average"
label="Avg Response Time(ms)"
width="220"
>
</el-table-column>
<el-table-column
prop="avgHits"
label="Avg Hits/s"
width="150"
>
</el-table-column>
<el-table-column
prop="tp90"
label="90% line(ms)"
width="150"
>
</el-table-column>
<el-table-column
prop="tp95"
label="95% line(ms)"
width="150"
>
</el-table-column>
<el-table-column
prop="tp99"
label="99% line(ms)"
width="150"
>
</el-table-column>
<el-table-column
prop="min"
label="Min Response Time(ms)"
width="220"
>
</el-table-column>
<el-table-column
prop="max"
label="Max Response Time(ms)"
width="220"
>
<el-table-column label="Response Times(ms)" align="center">
<el-table-column
prop="average"
label="Average"
/>
<el-table-column
prop="min"
label="Min"
/>
<el-table-column
prop="max"
label="Max"
/>
<el-table-column
prop="tp90"
label="90% line"
/>
<el-table-column
prop="tp95"
label="95% line"
/>
<el-table-column
prop="tp99"
label="99% line"
/>
</el-table-column>
<!-- <el-table-column-->
<!-- prop="avgHits"-->
<!-- label="Avg Hits/s"-->
<!-- width="150"-->
<!-- />-->
<el-table-column
prop="kbPerSec"
label="Avg Bandwidth(KBytes/s)"
width="220"
>
</el-table-column>
<el-table-column
prop="errors"
label="Error Percentage"
width="180"
fixed="right"
>
</el-table-column>
align="center"
width="200"
/>
</el-table>
</div>
</template>