代码结构调整,性能测试的相关代码放到一起
This commit is contained in:
parent
94556d6687
commit
19a0fe3b70
|
@ -1,8 +1,8 @@
|
|||
package io.metersphere.base.mapper.ext;
|
||||
|
||||
import io.metersphere.base.domain.LoadTestReport;
|
||||
import io.metersphere.controller.request.ReportRequest;
|
||||
import io.metersphere.dto.ReportDTO;
|
||||
import io.metersphere.performance.controller.request.ReportRequest;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
package io.metersphere.base.mapper.ext;
|
||||
|
||||
import io.metersphere.base.domain.TestCase;
|
||||
import io.metersphere.controller.request.ReportRequest;
|
||||
import io.metersphere.controller.request.testcase.QueryTestCaseRequest;
|
||||
import io.metersphere.controller.request.testplancase.QueryTestPlanCaseRequest;
|
||||
import io.metersphere.dto.ReportDTO;
|
||||
import io.metersphere.dto.TestCaseDTO;
|
||||
import io.metersphere.dto.TestPlanCaseDTO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.report.base;
|
||||
package io.metersphere.performance.base;
|
||||
|
||||
import lombok.Data;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.report.base;
|
||||
package io.metersphere.performance.base;
|
||||
|
||||
import lombok.Data;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.report.base;
|
||||
package io.metersphere.performance.base;
|
||||
|
||||
import lombok.Data;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.report.base;
|
||||
package io.metersphere.performance.base;
|
||||
|
||||
import lombok.Data;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.report.base;
|
||||
package io.metersphere.performance.base;
|
||||
|
||||
import lombok.Data;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.report.base;
|
||||
package io.metersphere.performance.base;
|
||||
|
||||
import lombok.Data;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.controller;
|
||||
package io.metersphere.performance.controller;
|
||||
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
|
@ -6,11 +6,11 @@ import io.metersphere.base.domain.LoadTestReport;
|
|||
import io.metersphere.commons.constants.RoleConstants;
|
||||
import io.metersphere.commons.utils.PageUtils;
|
||||
import io.metersphere.commons.utils.Pager;
|
||||
import io.metersphere.controller.request.ReportRequest;
|
||||
import io.metersphere.dto.LogDetailDTO;
|
||||
import io.metersphere.dto.ReportDTO;
|
||||
import io.metersphere.report.base.*;
|
||||
import io.metersphere.service.ReportService;
|
||||
import io.metersphere.performance.base.*;
|
||||
import io.metersphere.performance.controller.request.ReportRequest;
|
||||
import io.metersphere.performance.service.ReportService;
|
||||
import io.metersphere.user.SessionUtils;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresRoles;
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.controller;
|
||||
package io.metersphere.performance.controller;
|
||||
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
|
@ -8,8 +8,8 @@ import io.metersphere.commons.utils.PageUtils;
|
|||
import io.metersphere.commons.utils.Pager;
|
||||
import io.metersphere.controller.request.testplan.*;
|
||||
import io.metersphere.dto.LoadTestDTO;
|
||||
import io.metersphere.performance.service.PerformanceTestService;
|
||||
import io.metersphere.service.FileService;
|
||||
import io.metersphere.service.PerformanceTestService;
|
||||
import io.metersphere.user.SessionUtils;
|
||||
import org.apache.shiro.authz.annotation.Logical;
|
||||
import org.apache.shiro.authz.annotation.RequiresRoles;
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.controller.request;
|
||||
package io.metersphere.performance.controller.request;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.engine;
|
||||
package io.metersphere.performance.engine;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
|
@ -11,7 +11,7 @@ import io.metersphere.commons.constants.ResourcePoolTypeEnum;
|
|||
import io.metersphere.commons.exception.MSException;
|
||||
import io.metersphere.commons.utils.CommonBeanFactory;
|
||||
import io.metersphere.config.JmeterProperties;
|
||||
import io.metersphere.service.PerformanceTestService;
|
||||
import io.metersphere.performance.service.PerformanceTestService;
|
||||
import io.metersphere.service.TestResourcePoolService;
|
||||
import io.metersphere.service.TestResourceService;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.engine;
|
||||
package io.metersphere.performance.engine;
|
||||
|
||||
import java.util.Map;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.engine;
|
||||
package io.metersphere.performance.engine;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.engine;
|
||||
package io.metersphere.performance.engine;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
@ -10,11 +10,11 @@ import io.metersphere.commons.constants.FileType;
|
|||
import io.metersphere.commons.constants.ResourcePoolTypeEnum;
|
||||
import io.metersphere.commons.exception.MSException;
|
||||
import io.metersphere.config.KafkaProperties;
|
||||
import io.metersphere.engine.docker.DockerTestEngine;
|
||||
import io.metersphere.engine.kubernetes.KubernetesTestEngine;
|
||||
import io.metersphere.i18n.Translator;
|
||||
import io.metersphere.parse.EngineSourceParser;
|
||||
import io.metersphere.parse.EngineSourceParserFactory;
|
||||
import io.metersphere.performance.engine.docker.DockerTestEngine;
|
||||
import io.metersphere.performance.engine.kubernetes.KubernetesTestEngine;
|
||||
import io.metersphere.performance.parse.EngineSourceParser;
|
||||
import io.metersphere.performance.parse.EngineSourceParserFactory;
|
||||
import io.metersphere.service.FileService;
|
||||
import io.metersphere.service.TestResourcePoolService;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.engine;
|
||||
package io.metersphere.performance.engine;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.engine.docker;
|
||||
package io.metersphere.performance.engine.docker;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.metersphere.base.domain.LoadTestWithBLOBs;
|
||||
|
@ -7,11 +7,11 @@ import io.metersphere.commons.constants.ResourceStatusEnum;
|
|||
import io.metersphere.commons.exception.MSException;
|
||||
import io.metersphere.commons.utils.CommonBeanFactory;
|
||||
import io.metersphere.dto.NodeDTO;
|
||||
import io.metersphere.engine.AbstractEngine;
|
||||
import io.metersphere.engine.EngineContext;
|
||||
import io.metersphere.engine.EngineFactory;
|
||||
import io.metersphere.engine.docker.request.TestRequest;
|
||||
import io.metersphere.i18n.Translator;
|
||||
import io.metersphere.performance.engine.AbstractEngine;
|
||||
import io.metersphere.performance.engine.EngineContext;
|
||||
import io.metersphere.performance.engine.EngineFactory;
|
||||
import io.metersphere.performance.engine.docker.request.TestRequest;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import java.util.HashMap;
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.engine.docker.request;
|
||||
package io.metersphere.performance.engine.docker.request;
|
||||
|
||||
public class BaseRequest {
|
||||
private String testId;
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.engine.docker.request;
|
||||
package io.metersphere.performance.engine.docker.request;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.engine.kubernetes;
|
||||
package io.metersphere.performance.engine.kubernetes;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.fabric8.kubernetes.api.model.ConfigMap;
|
||||
|
@ -8,14 +8,14 @@ import io.metersphere.base.domain.LoadTestWithBLOBs;
|
|||
import io.metersphere.commons.constants.FileType;
|
||||
import io.metersphere.commons.exception.MSException;
|
||||
import io.metersphere.commons.utils.LogUtil;
|
||||
import io.metersphere.engine.AbstractEngine;
|
||||
import io.metersphere.engine.EngineContext;
|
||||
import io.metersphere.engine.EngineFactory;
|
||||
import io.metersphere.engine.kubernetes.crds.jmeter.Jmeter;
|
||||
import io.metersphere.engine.kubernetes.crds.jmeter.JmeterSpec;
|
||||
import io.metersphere.engine.kubernetes.provider.ClientCredential;
|
||||
import io.metersphere.engine.kubernetes.provider.KubernetesProvider;
|
||||
import io.metersphere.i18n.Translator;
|
||||
import io.metersphere.performance.engine.AbstractEngine;
|
||||
import io.metersphere.performance.engine.EngineContext;
|
||||
import io.metersphere.performance.engine.EngineFactory;
|
||||
import io.metersphere.performance.engine.kubernetes.crds.jmeter.Jmeter;
|
||||
import io.metersphere.performance.engine.kubernetes.crds.jmeter.JmeterSpec;
|
||||
import io.metersphere.performance.engine.kubernetes.provider.ClientCredential;
|
||||
import io.metersphere.performance.engine.kubernetes.provider.KubernetesProvider;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
|
||||
import java.util.HashMap;
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.engine.kubernetes.crds;
|
||||
package io.metersphere.performance.engine.kubernetes.crds;
|
||||
|
||||
import io.fabric8.kubernetes.client.CustomResource;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.engine.kubernetes.crds;
|
||||
package io.metersphere.performance.engine.kubernetes.crds;
|
||||
|
||||
import io.fabric8.kubernetes.api.builder.Function;
|
||||
import io.fabric8.kubernetes.client.CustomResourceDoneable;
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.engine.kubernetes.crds;
|
||||
package io.metersphere.performance.engine.kubernetes.crds;
|
||||
|
||||
import io.fabric8.kubernetes.client.CustomResourceList;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package io.metersphere.engine.kubernetes.crds.jmeter;
|
||||
package io.metersphere.performance.engine.kubernetes.crds.jmeter;
|
||||
|
||||
import io.metersphere.engine.kubernetes.crds.MeterSphereCustomResource;
|
||||
import io.metersphere.performance.engine.kubernetes.crds.MeterSphereCustomResource;
|
||||
|
||||
public class Jmeter extends MeterSphereCustomResource {
|
||||
public static final String CRD = "jmeters.metersphere.io";
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.engine.kubernetes.crds.jmeter;
|
||||
package io.metersphere.performance.engine.kubernetes.crds.jmeter;
|
||||
|
||||
import io.fabric8.kubernetes.api.builder.Function;
|
||||
import io.fabric8.kubernetes.client.CustomResourceDoneable;
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.engine.kubernetes.crds.jmeter;
|
||||
package io.metersphere.performance.engine.kubernetes.crds.jmeter;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.engine.kubernetes.crds.jmeter;
|
||||
package io.metersphere.performance.engine.kubernetes.crds.jmeter;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.engine.kubernetes.provider;
|
||||
package io.metersphere.performance.engine.kubernetes.provider;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
@ -8,9 +8,9 @@ import io.fabric8.kubernetes.client.ConfigBuilder;
|
|||
import io.fabric8.kubernetes.client.DefaultKubernetesClient;
|
||||
import io.fabric8.kubernetes.client.KubernetesClient;
|
||||
import io.fabric8.kubernetes.client.dsl.*;
|
||||
import io.metersphere.engine.kubernetes.crds.MeterSphereCustomResource;
|
||||
import io.metersphere.engine.kubernetes.crds.MeterSphereCustomResourceDoneable;
|
||||
import io.metersphere.engine.kubernetes.crds.MeterSphereCustomResourceList;
|
||||
import io.metersphere.performance.engine.kubernetes.crds.MeterSphereCustomResource;
|
||||
import io.metersphere.performance.engine.kubernetes.crds.MeterSphereCustomResourceDoneable;
|
||||
import io.metersphere.performance.engine.kubernetes.crds.MeterSphereCustomResourceList;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.engine.kubernetes.provider;
|
||||
package io.metersphere.performance.engine.kubernetes.provider;
|
||||
|
||||
public class ClientCredential {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.engine.kubernetes.provider;
|
||||
package io.metersphere.performance.engine.kubernetes.provider;
|
||||
|
||||
public class DockerRegistry {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.engine.kubernetes.provider;
|
||||
package io.metersphere.performance.engine.kubernetes.provider;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.engine.kubernetes.provider;
|
||||
package io.metersphere.performance.engine.kubernetes.provider;
|
||||
|
||||
public class KubernetesProvider extends AbstractClientProvider {
|
||||
public KubernetesProvider(String credential) {
|
|
@ -1,6 +1,6 @@
|
|||
package io.metersphere.parse;
|
||||
package io.metersphere.performance.parse;
|
||||
|
||||
import io.metersphere.engine.EngineContext;
|
||||
import io.metersphere.performance.engine.EngineContext;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package io.metersphere.parse;
|
||||
package io.metersphere.performance.parse;
|
||||
|
||||
import io.metersphere.commons.constants.FileType;
|
||||
import io.metersphere.parse.xml.XmlEngineSourceParse;
|
||||
import io.metersphere.performance.parse.xml.XmlEngineSourceParse;
|
||||
|
||||
public class EngineSourceParserFactory {
|
||||
public static EngineSourceParser createEngineSourceParser(String type) {
|
|
@ -1,9 +1,9 @@
|
|||
package io.metersphere.parse.xml;
|
||||
package io.metersphere.performance.parse.xml;
|
||||
|
||||
import io.metersphere.engine.EngineContext;
|
||||
import io.metersphere.parse.EngineSourceParser;
|
||||
import io.metersphere.parse.xml.reader.DocumentParser;
|
||||
import io.metersphere.parse.xml.reader.DocumentParserFactory;
|
||||
import io.metersphere.performance.engine.EngineContext;
|
||||
import io.metersphere.performance.parse.EngineSourceParser;
|
||||
import io.metersphere.performance.parse.xml.reader.DocumentParser;
|
||||
import io.metersphere.performance.parse.xml.reader.DocumentParserFactory;
|
||||
import org.w3c.dom.Document;
|
||||
import org.xml.sax.InputSource;
|
||||
|
|
@ -1,10 +1,8 @@
|
|||
package io.metersphere.parse.xml.reader;
|
||||
package io.metersphere.performance.parse.xml.reader;
|
||||
|
||||
import io.metersphere.engine.EngineContext;
|
||||
import io.metersphere.performance.engine.EngineContext;
|
||||
import org.w3c.dom.Document;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
public interface DocumentParser {
|
||||
String parse(EngineContext context, Document document) throws Exception;
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
package io.metersphere.parse.xml.reader;
|
||||
package io.metersphere.performance.parse.xml.reader;
|
||||
|
||||
import io.metersphere.commons.constants.FileType;
|
||||
import io.metersphere.parse.xml.reader.jmx.JmeterDocumentParser;
|
||||
import io.metersphere.performance.parse.xml.reader.jmx.JmeterDocumentParser;
|
||||
|
||||
public class DocumentParserFactory {
|
||||
public static DocumentParser createDocumentParser(String type) {
|
|
@ -1,11 +1,11 @@
|
|||
package io.metersphere.parse.xml.reader.jmx;
|
||||
package io.metersphere.performance.parse.xml.reader.jmx;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.metersphere.commons.utils.CommonBeanFactory;
|
||||
import io.metersphere.config.KafkaProperties;
|
||||
import io.metersphere.engine.EngineContext;
|
||||
import io.metersphere.parse.xml.reader.DocumentParser;
|
||||
import io.metersphere.performance.engine.EngineContext;
|
||||
import io.metersphere.performance.parse.xml.reader.DocumentParser;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.service;
|
||||
package io.metersphere.performance.service;
|
||||
|
||||
import io.metersphere.base.domain.*;
|
||||
import io.metersphere.base.mapper.*;
|
||||
|
@ -10,9 +10,11 @@ import io.metersphere.commons.exception.MSException;
|
|||
import io.metersphere.commons.utils.LogUtil;
|
||||
import io.metersphere.controller.request.testplan.*;
|
||||
import io.metersphere.dto.LoadTestDTO;
|
||||
import io.metersphere.engine.Engine;
|
||||
import io.metersphere.engine.EngineFactory;
|
||||
import io.metersphere.i18n.Translator;
|
||||
import io.metersphere.performance.engine.Engine;
|
||||
import io.metersphere.performance.engine.EngineFactory;
|
||||
import io.metersphere.service.FileService;
|
||||
import io.metersphere.service.TestResourceService;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
|
@ -1,4 +1,4 @@
|
|||
package io.metersphere.service;
|
||||
package io.metersphere.performance.service;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
@ -12,21 +12,19 @@ import io.metersphere.commons.constants.PerformanceTestStatus;
|
|||
import io.metersphere.commons.constants.ReportKeys;
|
||||
import io.metersphere.commons.exception.MSException;
|
||||
import io.metersphere.commons.utils.LogUtil;
|
||||
import io.metersphere.controller.request.ReportRequest;
|
||||
import io.metersphere.dto.LogDetailDTO;
|
||||
import io.metersphere.dto.ReportDTO;
|
||||
import io.metersphere.engine.Engine;
|
||||
import io.metersphere.engine.EngineFactory;
|
||||
import io.metersphere.report.base.*;
|
||||
import io.metersphere.performance.base.*;
|
||||
import io.metersphere.performance.controller.request.ReportRequest;
|
||||
import io.metersphere.performance.engine.Engine;
|
||||
import io.metersphere.performance.engine.EngineFactory;
|
||||
import io.metersphere.service.TestResourceService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
|
@ -12,6 +12,7 @@ import io.metersphere.controller.request.ProjectRequest;
|
|||
import io.metersphere.controller.request.testplan.DeleteTestPlanRequest;
|
||||
import io.metersphere.dto.ProjectDTO;
|
||||
import io.metersphere.i18n.Translator;
|
||||
import io.metersphere.performance.service.PerformanceTestService;
|
||||
import io.metersphere.user.SessionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
|
@ -14,8 +14,8 @@ import io.metersphere.commons.utils.LogUtil;
|
|||
import io.metersphere.controller.request.resourcepool.QueryResourcePoolRequest;
|
||||
import io.metersphere.dto.NodeDTO;
|
||||
import io.metersphere.dto.TestResourcePoolDTO;
|
||||
import io.metersphere.engine.kubernetes.provider.KubernetesProvider;
|
||||
import io.metersphere.i18n.Translator;
|
||||
import io.metersphere.performance.engine.kubernetes.provider.KubernetesProvider;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
|
Loading…
Reference in New Issue