Skip to content

Commit

Permalink
Add more job timers.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmchilton committed Dec 3, 2015
1 parent 299fbe9 commit 876c28f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/galaxy/tools/__init__.py
Expand Up @@ -39,6 +39,7 @@
from galaxy.tools.parser.xml import XmlPageSource
from galaxy.tools.toolbox import AbstractToolBox
from galaxy.util import rst_to_html, string_as_bool
from galaxy.util import ExecutionTimer
from galaxy.tools.parameters.meta import expand_meta_parameters
from galaxy.util.bunch import Bunch
from galaxy.util.expressions import ExpressionContext
Expand Down Expand Up @@ -1288,6 +1289,7 @@ def handle_input( self, trans, incoming, history=None, source='html' ):
if rerun_remap_job_id and len( expanded_incomings ) > 1:
raise exceptions.MessageException( 'Failure executing tool (cannot create multiple jobs when remapping existing job).' )

validation_timer = ExecutionTimer()
all_errors = []
all_params = []
validate_input = self.get_hook( 'validate_input' )
Expand All @@ -1310,7 +1312,7 @@ def handle_input( self, trans, incoming, history=None, source='html' ):
params = expanded_state.inputs
all_errors.append( errors )
all_params.append( params )

log.debug("Validated and populated state for tool request %s" % validation_timer)
# If there were errors, we stay on the same page and display
# error messages
if any( all_errors ):
Expand Down
3 changes: 2 additions & 1 deletion lib/galaxy/tools/execute.py
Expand Up @@ -20,6 +20,7 @@ def execute( trans, tool, param_combinations, history, rerun_remap_job_id=None,
failures, etc...).
"""
execution_tracker = ToolExecutionTracker( tool, param_combinations, collection_info )
all_jobs_timer = ExecutionTimer()
for params in execution_tracker.param_combinations:
job_timer = ExecutionTimer()
if workflow_invocation_uuid:
Expand All @@ -35,7 +36,7 @@ def execute( trans, tool, param_combinations, history, rerun_remap_job_id=None,
execution_tracker.record_success( job, result )
else:
execution_tracker.record_error( result )

log.debug("Executed all jobs for tool request: %s" % all_jobs_timer)
if collection_info:
history = history or tool.get_default_history_by_trans( trans )
execution_tracker.create_output_collections( trans, history, params )
Expand Down

0 comments on commit 876c28f

Please sign in to comment.