Class SessionSummary

java.lang.Object
com.scivicslab.turingworkflow.plugins.logdb.SessionSummary

public class SessionSummary extends Object
Summary of a workflow execution session.

Captures key metrics about a completed or in-progress workflow session, including node success/failure counts, log statistics, timing information, and execution context for reproducibility.

Since:
1.0
Author:
devteam@scivicslab.com
  • Constructor Details

    • SessionSummary

      public SessionSummary(long sessionId, String workflowName, String overlayName, String inventoryName, LocalDateTime startedAt, LocalDateTime endedAt, int nodeCount, SessionStatus status, int successCount, int failedCount, List<String> failedNodes, int totalLogEntries, int errorCount)
      Legacy constructor for backward compatibility (without execution context).
      Parameters:
      sessionId - the unique session identifier
      workflowName - the name of the executed workflow
      overlayName - the overlay name, may be null
      inventoryName - the inventory file name, may be null
      startedAt - the session start timestamp
      endedAt - the session end timestamp, may be null
      nodeCount - the total number of participating nodes
      status - the session lifecycle status
      successCount - the number of successful nodes
      failedCount - the number of failed nodes
      failedNodes - the list of failed node identifiers
      totalLogEntries - the total number of log entries
      errorCount - the number of ERROR-level log entries
    • SessionSummary

      public SessionSummary(long sessionId, String workflowName, String overlayName, String inventoryName, LocalDateTime startedAt, LocalDateTime endedAt, int nodeCount, SessionStatus status, int successCount, int failedCount, List<String> failedNodes, int totalLogEntries, int errorCount, String cwd, String gitCommit, String gitBranch, String commandLine, String pluginVersion, String pluginCommit)
      Full constructor with execution context for reproducibility.
      Parameters:
      sessionId - the unique session identifier
      workflowName - the name of the executed workflow
      overlayName - the overlay name, may be null
      inventoryName - the inventory file name, may be null
      startedAt - the session start timestamp
      endedAt - the session end timestamp, may be null
      nodeCount - the total number of participating nodes
      status - the session lifecycle status
      successCount - the number of successful nodes
      failedCount - the number of failed nodes
      failedNodes - the list of failed node identifiers
      totalLogEntries - the total number of log entries
      errorCount - the number of ERROR-level log entries
      cwd - the current working directory at execution time, may be null
      gitCommit - the git commit hash, may be null
      gitBranch - the git branch name, may be null
      commandLine - the command line used to invoke the workflow, may be null
      pluginVersion - the plugin version, may be null
      pluginCommit - the plugin git commit hash, may be null
  • Method Details

    • getSessionId

      public long getSessionId()
      Returns:
      the unique session identifier
    • getWorkflowName

      public String getWorkflowName()
      Returns:
      the name of the executed workflow
    • getOverlayName

      public String getOverlayName()
      Returns:
      the overlay name, or null
    • getInventoryName

      public String getInventoryName()
      Returns:
      the inventory file name, or null
    • getStartedAt

      public LocalDateTime getStartedAt()
      Returns:
      the session start timestamp
    • getEndedAt

      public LocalDateTime getEndedAt()
      Returns:
      the session end timestamp, or null if still running
    • getNodeCount

      public int getNodeCount()
      Returns:
      the total number of participating nodes
    • getStatus

      public SessionStatus getStatus()
      Returns:
      the session lifecycle status
    • getSuccessCount

      public int getSuccessCount()
      Returns:
      the number of nodes that completed successfully
    • getFailedCount

      public int getFailedCount()
      Returns:
      the number of nodes that failed
    • getFailedNodes

      public List<String> getFailedNodes()
      Returns:
      the list of failed node identifiers
    • getTotalLogEntries

      public int getTotalLogEntries()
      Returns:
      the total number of log entries in this session
    • getErrorCount

      public int getErrorCount()
      Returns:
      the number of ERROR-level log entries
    • getCwd

      public String getCwd()
      Returns:
      the current working directory at execution time, or null
    • getGitCommit

      public String getGitCommit()
      Returns:
      the git commit hash, or null
    • getGitBranch

      public String getGitBranch()
      Returns:
      the git branch name, or null
    • getCommandLine

      public String getCommandLine()
      Returns:
      the command line used to invoke the workflow, or null
    • getPluginVersion

      public String getPluginVersion()
      Returns:
      the plugin version, or null
    • getPluginCommit

      public String getPluginCommit()
      Returns:
      the plugin git commit hash, or null
    • getDuration

      public Duration getDuration()
      Computes the duration of the session.
      Returns:
      the duration between start and end, or Duration.ZERO if either timestamp is null
    • toString

      public String toString()
      Overrides:
      toString in class Object