Skip to content

Commit

Permalink
Merge pull request #1758 from akto-api-security/temp/db_call_logs
Browse files Browse the repository at this point in the history
added log for dep graph exists db call
  • Loading branch information
avneesh-akto authored Nov 22, 2024
2 parents 0eb6e92 + 38ee5f8 commit 13dfa1c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 + ""),
Expand All @@ -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();
Expand Down

0 comments on commit 13dfa1c

Please sign in to comment.