Warning

This document is for an old release of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.

galaxy.job_metrics package

This module defines the job metrics collection framework for Galaxy jobs.

The framework consists of two parts - the JobMetrics class and individual JobInstrumenter plugins.

A JobMetrics object reads any number of plugins from a configuration source such as an XML file, a YAML file, or a dictionary.

Each JobInstrumenter plugin object describes how to inject a bits of shell code into a job scripts (before and after tool commands run) and then collect the output of these from a job directory.

class galaxy.job_metrics.JobInstrumenter(plugin_classes, plugins_source, **kwargs)[source]

Bases: JobInstrumenterI

__init__(plugin_classes, plugins_source, **kwargs)[source]
get_configured_plugin(plugin_type: str)[source]
pre_execute_commands(job_directory)[source]
post_execute_commands(job_directory)[source]
collect_properties(job_id, job_directory)[source]
static from_file(plugin_classes, conf_file, **kwargs) JobInstrumenterI[source]
class galaxy.job_metrics.Safety(value)[source]

Bases: Enum

An enumeration.

UNSAFE = 2
POTENTIALLY_SENSITVE = 4
SAFE = 6

Submodules

galaxy.job_metrics.formatting module

Utilities related to formatting job metrics for human consumption.

class galaxy.job_metrics.formatting.FormattedMetric(title, value)[source]

Bases: tuple

property title

Alias for field number 0

property value

Alias for field number 1

class galaxy.job_metrics.formatting.JobMetricFormatter[source]

Bases: object

Format job metric key-value pairs for human consumption in Web UI.

format(key: Any, value: Any) FormattedMetric[source]
galaxy.job_metrics.formatting.seconds_to_str(value: int) str[source]

Convert seconds to a simple simple string describing the amount of time.

galaxy.job_metrics.safety module

class galaxy.job_metrics.safety.Safety(value)[source]

Bases: Enum

An enumeration.

UNSAFE = 2
POTENTIALLY_SENSITVE = 4
SAFE = 6