From 38ee5f8dfb9a3da922f46b27aebd9b8c505bc4a1 Mon Sep 17 00:00:00 2001 From: Avneesh Hota Date: Fri, 22 Nov 2024 13:55:43 +0530 Subject: [PATCH] added log for dep graph exists db call --- .../src/main/java/com/akto/action/DependencyAction.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/dashboard/src/main/java/com/akto/action/DependencyAction.java b/apps/dashboard/src/main/java/com/akto/action/DependencyAction.java index 36483d2614..28a69ab70a 100644 --- a/apps/dashboard/src/main/java/com/akto/action/DependencyAction.java +++ b/apps/dashboard/src/main/java/com/akto/action/DependencyAction.java @@ -39,6 +39,7 @@ public class DependencyAction extends UserAction { private boolean dependencyGraphExists = false; public String checkIfDependencyGraphAvailable() { + long start = System.currentTimeMillis(); Node node = DependencyFlowNodesDao.instance.findOne( Filters.and( Filters.eq("apiCollectionId", apiCollectionId + ""), @@ -47,6 +48,8 @@ public String checkIfDependencyGraphAvailable() { Filters.ne("maxDepth", 0) ), Projections.include("_id") ); + long end = System.currentTimeMillis(); + System.out.println("checkIfDependencyGraphAvailable db call took: " + (end - start) + " ms"); dependencyGraphExists = node != null; return SUCCESS.toUpperCase();