GnuTimeReport

Simple report module to create and handle the standard timing output of GNU time.

Examples to produce a TimeReport:

Commandline usage:
export REPORT_FILE="Path/To/MyFile"
/usr/bin/time -v -o $REPORT_FILE sleep 2
Experiment code:
from benchbuild.utils.cmd import time, sleep
report_file = "Path/To/MyFile"
command_to_measure = sleep["2"]
time("-v", "-o", f"{report_file}", command_to_measure)
exception varats.report.gnu_time_report.WrongTimeReportFormat[source]

Bases: Exception

Thrown if a time report could not be parsed.

class varats.report.gnu_time_report.TimeReport(path)[source]

Bases: BaseReport

Report class to access GNU time output.

property command_name: str

Name of the command that was executed.

property user_time: timedelta

Measured user time in seconds.

property system_time: timedelta

Measured system time in seconds.

property wall_clock_time: timedelta

Elapsed wall clock time.

property max_res_size: int

Maximum resident size.

property major_page_faults: int

Major page faults (require I/O).

property minor_page_faults: int

Minor page faults (reclaim a frame).

property filesystem_io: Tuple[int, int]

Filesystem inputs/outputs.

Returns: a tuple of (#inputs, #outputs)

property voluntary_ctx_switches: int

Number of voluntary context switches.

property involuntary_ctx_switches: int

Number of involuntary context switches.

FILE_TYPE: str = 'txt'
SHORTHAND: str = 'TR'
class varats.report.gnu_time_report.TimeReportAggregate(path)[source]

Bases: ReportAggregate[TimeReport]

Context Manager for parsing multiple time reports stored inside a zip file.

property measurements_wall_clock_time: List[float]

Wall clock time measurements of all aggregated reports.

property measurements_ctx_switches: List[int]

Context switches measurements of all aggregated reports.

property max_resident_sizes: List[int]
property major_page_faults: List[int]
property minor_page_faults: List[int]
property filesystem_io: List[Tuple[int, int]]
property summary: str
FILE_TYPE: str = 'zip'
SHORTHAND: str = 'TRAgg'
class varats.report.gnu_time_report.WLTimeReportAggregate(path)[source]

Bases: WorkloadSpecificReportAggregate[TimeReport]

Context Manager for parsing multiple time reports stored inside a zip file and grouping them based on the workload they belong to.

measurements_wall_clock_time(workload_name)[source]

Wall clock time measurements of all aggregated reports.

Return type:

List[float]

measurements_ctx_switches(workload_name)[source]

Context switches measurements of all aggregated reports.

Return type:

List[int]

FILE_TYPE: str = 'zip'
SHORTHAND: str = 'WLTRAgg'
max_resident_sizes(workload_name)[source]
Return type:

List[int]

summary()[source]
Return type:

str