evergreen.metrics package

Submodules

evergreen.metrics.buildmetrics module

Metrics for Evergreen builds.

class evergreen.metrics.buildmetrics.BuildMetrics(build: Build)[source]

Bases: object

Metrics about an evergreen build.

as_dict(include_children: bool = False) Dict[source]

Provide a dictionary representation.

Parameters:

include_children – Include child tasks in dictionary.

Returns:

Dictionary of metrics.

calculate(task_filter_fn: Optional[Callable] = None) BuildMetrics[source]

Calculate metrics for the given build.

Parameters:

task_filter_fn – function to filter tasks included for metrics, should accept a task argument.

Returns:

self.

property create_time: Optional[datetime]

Time the first task of the build was created.

Returns:

Time first task was created.

property end_time: Optional[datetime]

Time last task of build was completed.

Returns:

Time last task was completed.

property makespan: Optional[timedelta]

Wall clock duration of build.

Returns:

Timedelta duration of build.

property pct_display_tasks_failed: float

Get the percentage of failed display tasks.

Returns:

Percentage of failed display tasks.

property pct_display_tasks_success: float

Get the percentage of successful display tasks.

Returns:

Percentage of successful display tasks.

property pct_display_tasks_system_failure: float

Get the percentage of system failure display tasks.

Returns:

Percentage of system failure display tasks.

property pct_display_tasks_timed_out: float

Get the percentage of timeout display tasks.

Returns:

Percentage of timeout display tasks.

property pct_display_tasks_undispatched: float

Get the percentage of undispatched display_tasks.

Returns:

Percentage of undispatched display_tasks.

property pct_tasks_failed: float

Get the percentage of failed tasks.

Returns:

Percentage of failed tasks.

property pct_tasks_success: float

Get the percentage of successful tasks.

Returns:

Percentage of successful tasks.

property pct_tasks_system_failure: float

Get the percentage of system failure tasks.

Returns:

Percentage of system failure tasks.

property pct_tasks_timed_out: float

Get the percentage of timeout tasks.

Returns:

Percentage of timeout tasks.

property pct_tasks_undispatched: float

Get the percentage of undispatched tasks.

Returns:

Percentage of undispatched tasks.

property start_time: Optional[datetime]

Time first task of build was started.

Returns:

Time first task was started.

property total_display_tasks: int

Get the total display tasks in the build.

Returns:

total display tasks.

property total_tasks: int

Get the total tasks in the build.

Returns:

total tasks.

property wait_time: Optional[timedelta]

Wall clock duration until build was started.

Returns:

Timedelta duration until build was started.

evergreen.metrics.versionmetrics module

Metrics for an evergreen version.

class evergreen.metrics.versionmetrics.VersionMetrics(version: Version)[source]

Bases: object

Metrics about an evergreen version.

as_dict(include_children: bool = False) Dict[source]

Provide a dictionary representation.

Parameters:

include_children – Include child build tasks in dictionary.

Returns:

Dictionary of metrics.

calculate(task_filter_fn: Optional[Callable] = None) VersionMetrics[source]

Calculate metrics for the given build.

Parameters:

task_filter_fn – function to filter tasks included for metrics, should accept a task argument.

Returns:

self.

property create_time: Optional[datetime]

Time the first task of the version was created.

Returns:

Time first task was created.

property end_time: Optional[datetime]

Time last task of version was completed.

Returns:

Time last task was completed.

property makespan: Optional[float]

Wall clock duration of version.

Returns:

Duration of version in seconds.

property pct_tasks_failure: float

Get the percentage of failure tasks.

Returns:

Percentage of failure tasks.

property pct_tasks_success: float

Get the percentage of successful tasks.

Returns:

Percentage of successful tasks.

property pct_tasks_system_failure: float

Get the percentage of system failure tasks.

Returns:

Percentage of system failure tasks.

property pct_tasks_timeout: float

Get the percentage of timeout tasks.

Returns:

Percentage of timeout tasks.

property start_time: Optional[datetime]

Time first task of version was started.

Returns:

Time first task was started.

property total_tasks: int

Get the total tasks in the version.

Returns:

total tasks

property wait_time: Optional[float]

Wall clock duration until version was started.

Returns:

Duration until version was started in seconds.

Module contents