From 63a7134cbb46cf9d5debf99db4d7280cff2ed8e2 Mon Sep 17 00:00:00 2001 From: janani Date: Wed, 12 Jun 2019 17:25:59 +0200 Subject: [PATCH] round cpu exec time --- lib/galaxy/job_metrics/formatting.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/galaxy/job_metrics/formatting.py b/lib/galaxy/job_metrics/formatting.py index 6bda18418c2..0e0ce11fbc3 100644 --- a/lib/galaxy/job_metrics/formatting.py +++ b/lib/galaxy/job_metrics/formatting.py @@ -11,8 +11,8 @@ class JobMetricFormatter(object): def seconds_to_str(value): """Convert seconds to a simple simple string describing the amount of time.""" if value < 60: - return "%s seconds" % value + return "%s seconds" % round(value, 2) elif value < 3600: - return "%s minutes" % (value / 60) + return "%s minutes" % round(value / 60, 2) else: - return "%s hours and %s minutes" % (value / 3600, (value % 3600) / 60) + return "%s hours and %s minutes" % (round(value / 3600, 2), round((value % 3600) / 60, 2))