This commit is contained in:
Captain.B 2020-04-01 10:45:33 +08:00
parent 911857f334
commit 742a082689
3 changed files with 14 additions and 24 deletions

View File

@ -1,5 +1,16 @@
package io.metersphere.commons.constants;
public enum FileType {
JMX, CSV
JMX(".jmx"), CSV(".csv");
// 保存后缀
private String suffix;
FileType(String suffix) {
this.suffix = suffix;
}
public String suffix() {
return this.suffix;
}
}

View File

@ -1,22 +0,0 @@
package io.metersphere.commons.constants;
public enum JmeterReportType {
AggregateReport,
SynthesisReport,
ThreadsStateOverTime,
BytesThroughputOverTime,
HitsPerSecond,
LatenciesOverTime,
PerfMon,
DbMon,
JMXMon,
ResponseCodesPerSecond,
ResponseTimesDistribution,
ResponseTimesOverTime,
ResponseTimesPercentiles,
ThroughputVsThreads,
TimesVsThreads,
TransactionsPerSecond,
PageDataExtractorOverTime,
MergeResults,
}

View File

@ -5,6 +5,7 @@ import io.fabric8.kubernetes.api.model.ConfigMap;
import io.fabric8.kubernetes.api.model.ObjectMeta;
import io.fabric8.kubernetes.client.KubernetesClient;
import io.metersphere.base.domain.LoadTestWithBLOBs;
import io.metersphere.commons.constants.FileType;
import io.metersphere.commons.exception.MSException;
import io.metersphere.commons.utils.CommonBeanFactory;
import io.metersphere.commons.utils.LogUtil;
@ -74,7 +75,7 @@ public class KubernetesTestEngine extends AbstractEngine {
setName(configMapName);
}});
item.setData(new HashMap<String, String>() {{
put(context.getTestId() + ".jmx", context.getContent());
put(context.getTestId() + FileType.JMX.suffix(), context.getContent());
if (MapUtils.isNotEmpty(context.getTestData())) {
putAll(context.getTestData());
}