图细节

This commit is contained in:
Captain.B 2020-03-05 19:11:08 +08:00
parent f7dc764e7b
commit df12289175
1 changed files with 14 additions and 8 deletions

View File

@ -170,6 +170,7 @@
this.orgOptions = {
xAxis: {
type: 'category',
boundaryGap: false,
data: []
},
yAxis: {
@ -177,6 +178,7 @@
},
tooltip: {
trigger: 'axis',
formatter: '{a}: {c0}',
axisPointer: {
lineStyle: {
color: '#57617B'
@ -184,11 +186,11 @@
}
},
series: [{
name: 'User',
data: [],
type: 'line',
step: 'start',
smooth: false,
symbol: 'circle',
symbolSize: 5,
showSymbol: false,
lineStyle: {
@ -219,16 +221,23 @@
}]
};
let timePeriod = Math.floor(this.rampUpTime / this.step);
let threadPeriod = Math.floor(this.threadNumber / this.step);
let threadInc = threadPeriod;
let timeInc = timePeriod;
for (let i = 0; i < this.duration; i++) {
let threadPeriod = Math.floor(this.threadNumber / this.step);
let threadInc1 = Math.floor(this.threadNumber / this.step);
let threadInc2 = Math.ceil(this.threadNumber / this.step);
let inc2count = this.threadNumber - this.step * threadInc1;
for (let i = 0; i <= this.duration; i++) {
// x
this.orgOptions.xAxis.data.push(i);
if (i > timePeriod) {
threadPeriod = threadPeriod + threadInc;
timePeriod += timeInc;
if (inc2count > 0) {
threadPeriod = threadPeriod + threadInc2;
inc2count--;
} else {
threadPeriod = threadPeriod + threadInc1;
}
if (threadPeriod > this.threadNumber) {
threadPeriod = this.threadNumber;
}
@ -237,9 +246,6 @@
this.orgOptions.series[0].data.push(threadPeriod);
}
}
//
this.orgOptions.xAxis.data.push(this.duration);
this.orgOptions.series[0].data.push(this.threadNumber);
},
convertProperty() {
/// todo4jmeter ConcurrencyThreadGroup plugin