Class GpuSummarySection
java.lang.Object
com.scivicslab.actoriac.report.sections.basic.GpuSummarySection
- All Implemented Interfaces:
SectionBuilder
POJO section builder that summarizes GPU information from logs.
Pure business logic - no CallableByActionName.
Use GpuSummarySectionIIAR to expose as an actor.
Parses GPU information from workflow execution logs, supporting both NVIDIA (nvidia-smi) and AMD (ROCm) GPU data formats.
Output example:
[GPU Summary] 192.168.5.13, gpu, NVIDIA GeForce RTX 4080 192.168.5.13, vram, 16GB 192.168.5.13, driver, 550.54.14 192.168.5.13, toolkit, CUDA 12.4 192.168.5.13, arch, 8.9 192.168.5.14, gpu, NVIDIA GeForce RTX 4080 ... Summary: 2 NVIDIA, 1 AMD
- Since:
- 2.16.0
- Author:
- devteam@scivicslab.com
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classGPU information holder. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate StringBuild GPU summary from logs.private StringformatOutput(Map<String, GpuSummarySection.GpuInfo> nodeGpus) Format the output string.generate()Generates the section content.getTitle()Returns the section title.private voidparseGpuMessage(String message, GpuSummarySection.GpuInfo gpuInfo) Parse GPU information from a log message.voidsetConnection(Connection connection) Sets the database connection for log queries.voidsetSessionId(long sessionId) Sets the session ID to query logs from.
-
Field Details
-
logger
-
connection
-
sessionId
-
-
Constructor Details
-
GpuSummarySection
public GpuSummarySection()
-
-
Method Details
-
setConnection
Sets the database connection for log queries.- Parameters:
connection- the JDBC connection to the H2 log database
-
setSessionId
Sets the session ID to query logs from.- Parameters:
sessionId- the session ID
-
generate
Description copied from interface:SectionBuilderGenerates the section content.- Specified by:
generatein interfaceSectionBuilder- Returns:
- the section content as a string
-
buildGpuSummary
Build GPU summary from logs.- Throws:
SQLException
-
parseGpuMessage
Parse GPU information from a log message. -
formatOutput
Format the output string. -
getTitle
Description copied from interface:SectionBuilderReturns the section title.If null or empty, the section content is output without a title line.
- Specified by:
getTitlein interfaceSectionBuilder- Returns:
- the section title, or null for no title
-