From 1a8a6c779f497cd776877fcbdf9921b8d54c3888 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Sun, 4 Apr 2021 14:21:43 +0800 Subject: [PATCH] =?UTF-8?q?revert(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E5=9B=9E=E9=80=80=E5=85=B3=E4=BA=8E=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E6=97=B6=E9=97=B4=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xml/reader/jmx/JmeterDocumentParser.java | 2 - .../components/PerformancePressureConfig.vue | 43 ------------------- 2 files changed, 45 deletions(-) diff --git a/backend/src/main/java/io/metersphere/performance/parse/xml/reader/jmx/JmeterDocumentParser.java b/backend/src/main/java/io/metersphere/performance/parse/xml/reader/jmx/JmeterDocumentParser.java index ba015e589c..5d1e7e345d 100644 --- a/backend/src/main/java/io/metersphere/performance/parse/xml/reader/jmx/JmeterDocumentParser.java +++ b/backend/src/main/java/io/metersphere/performance/parse/xml/reader/jmx/JmeterDocumentParser.java @@ -601,8 +601,6 @@ public class JmeterDocumentParser implements DocumentParser { collectionProp.appendChild(createKafkaProp(document, "test.name", context.getTestName())); collectionProp.appendChild(createKafkaProp(document, "test.startTime", context.getStartTime().toString())); collectionProp.appendChild(createKafkaProp(document, "test.reportId", context.getReportId())); - collectionProp.appendChild(createKafkaProp(document, "test.expectedDuration", duration));// ms - collectionProp.appendChild(createKafkaProp(document, "test.expectedDelayEndTime", kafkaProperties.getExpectedDelayEndTime())); // 30s elementProp.appendChild(collectionProp); // set elementProp diff --git a/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue b/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue index f23bba6ade..733104d668 100644 --- a/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue +++ b/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue @@ -180,7 +180,6 @@ import {findThreadGroup} from "@/business/components/performance/test/model/Thre const HANDLER = "handler"; const THREAD_GROUP_TYPE = "tgType"; -const EXPECTED_DURATION = "expectedDuration"; const SERIALIZE_THREAD_GROUPS = "serializeThreadGroups"; const TARGET_LEVEL = "TargetLevel"; const RAMP_UP = "RampUp"; @@ -648,50 +647,9 @@ export default { } return this.$t('schedule.cron.seconds'); }, - calculateDuration() { - let expectedDuration = 0; - for (let i = 0; i < this.threadGroups.length; i++) { - if (this.serializeThreadGroups) { - switch (this.threadGroups[i].unit) { - case "S": - expectedDuration += this.threadGroups[i].duration; - break; - case "M": - expectedDuration += this.threadGroups[i].duration * 60; - break; - case "H": - expectedDuration += this.threadGroups[i].duration * 60 * 60; - break; - default: - break; - } - } else { - let tmp = 0; - switch (this.threadGroups[i].unit) { - case "S": - tmp = this.threadGroups[i].duration; - break; - case "M": - tmp = this.threadGroups[i].duration * 60; - break; - case "H": - tmp = this.threadGroups[i].duration * 60 * 60; - break; - default: - break; - } - if (expectedDuration < tmp) { - expectedDuration = tmp; - } - } - } - return expectedDuration; - }, convertProperty() { /// todo:下面4个属性是jmeter ConcurrencyThreadGroup plugin的属性,这种硬编码不太好吧,在哪能转换这种属性? let result = []; - // 先计算执行时间 - let expectedDuration = this.calculateDuration(); // 再组织数据 for (let i = 0; i < this.threadGroups.length; i++) { @@ -711,7 +669,6 @@ export default { {key: ENABLED, value: this.threadGroups[i].enabled}, {key: DELETED, value: this.threadGroups[i].deleted}, {key: THREAD_GROUP_TYPE, value: this.threadGroups[i].tgType}, - {key: EXPECTED_DURATION, value: expectedDuration}, {key: SERIALIZE_THREAD_GROUPS, value: this.serializeThreadGroups}, ]); }