refactor: 去掉无用的接口
This commit is contained in:
parent
7c04bf4ca5
commit
27990fdacc
|
@ -1,7 +1,5 @@
|
|||
package io.metersphere.performance.engine;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface Engine {
|
||||
Long getStartTime();
|
||||
|
||||
|
@ -10,6 +8,4 @@ public interface Engine {
|
|||
void start();
|
||||
|
||||
void stop();
|
||||
|
||||
Map<String, String> log();
|
||||
}
|
||||
|
|
|
@ -15,9 +15,7 @@ import io.metersphere.performance.engine.EngineFactory;
|
|||
import io.metersphere.performance.engine.docker.request.TestRequest;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class DockerTestEngine extends AbstractEngine {
|
||||
|
@ -115,20 +113,4 @@ public class DockerTestEngine extends AbstractEngine {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> log() {
|
||||
String testId = loadTest.getId();
|
||||
Map<String, String> logs = new HashMap<>();
|
||||
this.resourceList.forEach(r -> {
|
||||
NodeDTO node = JSON.parseObject(r.getConfiguration(), NodeDTO.class);
|
||||
String ip = node.getIp();
|
||||
Integer port = node.getPort();
|
||||
|
||||
String uri = String.format(BASE_URL + "/jmeter/container/log/" + testId, ip, port);
|
||||
String log = restTemplate.getForObject(uri, String.class);
|
||||
logs.put(node.getIp(), log);
|
||||
});
|
||||
return logs;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue