galaxy.jobs.metrics package

Submodules

galaxy.jobs.metrics.formatting module

Utilities related to formatting job metrics for human consumption.

class galaxy.jobs.metrics.formatting.JobMetricFormatter[source]

Bases: object

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

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

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

Module contents

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.jobs.metrics.JobInstrumenter(plugin_classes, plugins_source, **kwargs)[source]

Bases: object

collect_properties(job_id, job_directory)[source]
static from_file(plugin_classes, conf_file, **kwargs)[source]
post_execute_commands(job_directory)[source]
pre_execute_commands(job_directory)[source]
class galaxy.jobs.metrics.JobMetrics(conf_file=None, **kwargs)[source]

Bases: object

Load and store a collection of JobInstrumenter objects.

collect_properties(destination_id, job_id, job_directory)[source]
format(plugin, key, value)[source]

Find formatting.JobMetricFormatter corresponding to instrumented plugin value.

set_destination_conf_element(destination_id, element)[source]
set_destination_conf_file(destination_id, conf_file)[source]
set_destination_instrumenter(destination_id, job_instrumenter=None)[source]
class galaxy.jobs.metrics.NullJobInstrumenter[source]

Bases: object

collect_properties(job_id, job_directory)[source]
post_execute_commands(job_directory)[source]
pre_execute_commands(job_directory)[source]