Warning

This document is for an in-development version 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.JobMetrics(conf_file=None, **kwargs)[source]

Bases: object

Load and store a collection of JobInstrumenter objects.

__init__(conf_file=None, **kwargs)[source]

Load JobInstrumenter objects from specified configuration file.

format(plugin, key, value)[source]

Find formatting.JobMetricFormatter corresponding to instrumented plugin value.

set_destination_conf_file(destination_id, conf_file)[source]
set_destination_conf_element(destination_id, element)[source]
set_destination_conf_dicts(destination_id, conf_dicts)[source]
set_destination_instrumenter(destination_id, job_instrumenter=None)[source]
collect_properties(destination_id, job_id, job_directory)[source]
class galaxy.job_metrics.NullJobInstrumenter[source]

Bases: object

pre_execute_commands(job_directory)[source]
post_execute_commands(job_directory)[source]
collect_properties(job_id, job_directory)[source]
class galaxy.job_metrics.JobInstrumenter(plugin_classes, plugins_source, **kwargs)[source]

Bases: object

__init__(plugin_classes, plugins_source, **kwargs)[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)[source]

Submodules

galaxy.job_metrics.formatting module

Utilities related to formatting job metrics for human consumption.

class galaxy.job_metrics.formatting.JobMetricFormatter[source]

Bases: object

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

format(key, value)[source]
galaxy.job_metrics.formatting.seconds_to_str(value)[source]

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