Skip to content

OdbGraph shows confusing log message about node initialization #75

@ursachec

Description

@ursachec

OdbGraph should show a No nodes to initialize from current storage message instead of initializing 0 nodes from existing storage - this may take some time

final Set<Map.Entry<Long, byte[]>> serializedNodes = storage.allNodes();
logger.info("initializing " + serializedNodes.size() + " nodes from existing storage - this may take some time");

Stumbled upon this small discrepancy while trying out Ocular.

ocular> workspace.openProject("HELLO_SHIFTLEFT") 
Loading base CPG from: /home/ursachec/.shiftleft/ocular/workspace/HELLO_SHIFTLEFT/cpg.bin
Overlays: 
2020-04-03 18:39:16.602 [HeapUsageMonitor] INFO installed GC monitors. will clear references if heap (after GC) is larger than 80%
2020-04-03 18:39:16.606 [OdbGraph] INFO initializing 0 nodes from existing storage - this may take some time
2020-04-03 18:39:16.607 [OdbGraph] INFO initialized odbgraph[nodes: 0] from existing storage in 4ms
res12: Option[workspacehandling.Project] = Some(
  Project(
    ProjectFile(
      "/home/ursachec/code/HelloShiftLeft/target/hello-shiftleft-0.0.1.jar",
      "HELLO_SHIFTLEFT"
    ),
    /home/ursachec/.shiftleft/ocular/workspace/HELLO_SHIFTLEFT,
    Some(io.shiftleft.codepropertygraph.Cpg@cd809c6f),
    List()
  )
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions