refactor: 去掉无用的接口

This commit is contained in:
Captain.B 2020-07-17 16:56:24 +08:00
parent 7c04bf4ca5
commit 27990fdacc
2 changed files with 0 additions and 22 deletions

View File

@ -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();
}

View File

@ -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;
}
}