load tester beta

This commit is contained in:
현성필
2024-02-19 12:59:05 +09:00
parent 7424e0d072
commit 1d64cab399
63 changed files with 5600 additions and 1944 deletions
@@ -0,0 +1,31 @@
package com.eactive.testmaster.loadtest.controller;
import com.eactive.testmaster.loadtest.dto.LoadTestDTO;
import com.eactive.testmaster.loadtest.service.LoadTestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
@RestController
@Scope("session")
public class LoadTestController {
@Autowired
private LoadTestService loadTestService;
@PostMapping("/startLoadTest")
public ResponseEntity<String> startLoadTest(@RequestBody LoadTestDTO loadTestDTO) {
loadTestService.startLoadTest(loadTestDTO);
return ResponseEntity.ok("Load Test Started");
}
//stop
@PostMapping("/stopLoadTest")
public ResponseEntity<String> stopLoadTest(@RequestBody LoadTestDTO loadTestDTO) {
loadTestService.stopLoadTest(loadTestDTO.getId());
return ResponseEntity.ok("Load Test Stopped");
}
}