[Updated] Dockerfiles so everything runs using docker compose up, added the benchmark and speed tests

This commit is contained in:
Ninjaws
2024-11-01 19:52:53 +01:00
parent 675bdc7f8e
commit 595b83b364
14 changed files with 143 additions and 17 deletions
@@ -48,4 +48,21 @@ public class ApiService {
logger.log(System.Logger.Level.ERROR, "Critical failure", e);
}
}
/**
* Collect a chuck of 50 items
* Store them in the DataService
*/
public void collectBulk() {
String url = apiUrl + "?amount=50";
try {
ResponseEntity<String> response = restTemplate.getForEntity(url, String.class);
String json = response.getBody();
ApiResponse apiResponse = cleanerService.extractApiResponse(json);
responseHandler.handleResponse(apiResponse);
} catch (RestClientException | IOException e) {
logger.log(System.Logger.Level.ERROR, "Critical failure", e);
}
}
}