From ec2caba252521269417a08f73e1a02a221714f67 Mon Sep 17 00:00:00 2001 From: Umesh Kumar <166806589+TangoBeeAkto@users.noreply.github.com> Date: Wed, 25 Dec 2024 13:42:25 +0530 Subject: [PATCH] added logs --- .../main/java/com/akto/action/testing/StartTestAction.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java b/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java index 4270554599..1f2ee2106a 100644 --- a/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java +++ b/apps/dashboard/src/main/java/com/akto/action/testing/StartTestAction.java @@ -601,6 +601,7 @@ public String fetchTestingRunResults() { Filters.in(TestingRunIssues.LATEST_TESTING_RUN_SUMMARY_ID, testingRunResultSummaryId) ); List issueslist = TestingRunIssuesDao.instance.findAll(ignoredIssuesFilters, Projections.include("_id")); + loggerMaker.infoAndAddToDb("Fetched testing run issues of size: " + issueslist.size(), LogDb.DASHBOARD); List testingRunResultFilters = prepareTestRunResultsFilters(testingRunResultSummaryId, queryMode); @@ -621,8 +622,10 @@ public String fetchTestingRunResults() { Bson filters = testingRunResultFilters.isEmpty() ? Filters.empty() : Filters.and(testingRunResultFilters); this.testingRunResults = TestingRunResultDao.instance .fetchLatestTestingRunResultWithCustomAggregations(filters, pageLimit, skip, sortStage); + loggerMaker.infoAndAddToDb("Fetched testing run results of size: " + testingRunResults.size(), LogDb.DASHBOARD); removeTestingRunResultsByIssues(testingRunResults, issueslist, false); + loggerMaker.infoAndAddToDb("Removed ignored issues from testing run results. Current size of testing run results: " + testingRunResults.size(), LogDb.DASHBOARD); testCountMap = new HashMap<>(); for(QueryMode qm : QueryMode.values()) { @@ -654,6 +657,7 @@ public static void removeTestingRunResultsByIssues(List testin String key = apiInfoKeyString + "|" + issue.getId().getTestSubCategory(); issuesSet.add(key); } + loggerMaker.infoAndAddToDb("Total issues to be removed from TestingRunResults list: " + issuesSet.size(), LogDb.DASHBOARD); Iterator resultIterator = testingRunResults.iterator();