Class SessionSummary
java.lang.Object
com.scivicslab.turingworkflow.plugins.logdb.SessionSummary
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 Summary
ConstructorsConstructorDescriptionSessionSummary(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).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. -
Method Summary
-
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 identifierworkflowName- the name of the executed workflowoverlayName- the overlay name, may benullinventoryName- the inventory file name, may benullstartedAt- the session start timestampendedAt- the session end timestamp, may benullnodeCount- the total number of participating nodesstatus- the session lifecycle statussuccessCount- the number of successful nodesfailedCount- the number of failed nodesfailedNodes- the list of failed node identifierstotalLogEntries- the total number of log entrieserrorCount- 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 identifierworkflowName- the name of the executed workflowoverlayName- the overlay name, may benullinventoryName- the inventory file name, may benullstartedAt- the session start timestampendedAt- the session end timestamp, may benullnodeCount- the total number of participating nodesstatus- the session lifecycle statussuccessCount- the number of successful nodesfailedCount- the number of failed nodesfailedNodes- the list of failed node identifierstotalLogEntries- the total number of log entrieserrorCount- the number of ERROR-level log entriescwd- the current working directory at execution time, may benullgitCommit- the git commit hash, may benullgitBranch- the git branch name, may benullcommandLine- the command line used to invoke the workflow, may benullpluginVersion- the plugin version, may benullpluginCommit- the plugin git commit hash, may benull
-
-
Method Details
-
getSessionId
public long getSessionId()- Returns:
- the unique session identifier
-
getWorkflowName
- Returns:
- the name of the executed workflow
-
getOverlayName
- Returns:
- the overlay name, or
null
-
getInventoryName
- Returns:
- the inventory file name, or
null
-
getStartedAt
- Returns:
- the session start timestamp
-
getEndedAt
- Returns:
- the session end timestamp, or
nullif still running
-
getNodeCount
public int getNodeCount()- Returns:
- the total number of participating nodes
-
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
- 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
- Returns:
- the current working directory at execution time, or
null
-
getGitCommit
- Returns:
- the git commit hash, or
null
-
getGitBranch
- Returns:
- the git branch name, or
null
-
getCommandLine
- Returns:
- the command line used to invoke the workflow, or
null
-
getPluginVersion
- Returns:
- the plugin version, or
null
-
getPluginCommit
- Returns:
- the plugin git commit hash, or
null
-
getDuration
Computes the duration of the session.- Returns:
- the duration between start and end, or
Duration.ZEROif either timestamp isnull
-
toString
-