ProfileBlockParser#

class pyedb.workflows.utilities.siwave_log_parser.ProfileBlockParser(lines: list[str])#

Bases: BlockParser

Extract profile entries showing task timing and resource usage.

This parser processes [PROFILE] tagged lines to extract performance metrics including real time, CPU time, memory usage, and additional task-specific data.

Examples

>>> lines = [
...     "11/10/2025 09:30:00 AM [PROFILE] Mesh Generation : Real Time 00:05:30 : "
...     "CPU Time 00:05:25 : Memory 2.5 GB : Number of elements: 50000"
... ]
>>> parser = ProfileBlockParser(lines)
>>> profiles = parser.parse()
>>> profiles[0].task
'Mesh Generation'
>>> profiles[0].real_time
'00:05:30'

Overview#

parse

Parse profile entries showing task timing and resource usage.

Import detail#

from pyedb.workflows.utilities.siwave_log_parser import ProfileBlockParser

Method detail#

ProfileBlockParser.parse() list[ProfileEntry]#

Parse profile entries showing task timing and resource usage.

Returns:
list of ProfileEntry

List of profile entries with timing and resource consumption data.

Examples

>>> lines = ["Regular log line without profile"]
>>> parser = ProfileBlockParser(lines)
>>> profiles = parser.parse()
>>> len(profiles)
0