diff options
author | Aaron LI <aly@aaronly.me> | 2017-09-01 16:39:00 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-09-01 16:39:00 +0800 |
commit | ab7b6dd4c93a5130815ae4071f022b884979d91f (patch) | |
tree | c3ae6cb658bd1385b9c2d20f8d4febb85d51a68c | |
parent | fb559ff794b79246fe64c3f0a11ddc7c55d9a9a8 (diff) | |
download | fg21sim-ab7b6dd4c93a5130815ae4071f022b884979d91f.tar.bz2 |
Update time cost report; Also fix a variable name error
-rwxr-xr-x | bin/fg21sim | 4 | ||||
-rw-r--r-- | fg21sim/foregrounds.py | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/bin/fg21sim b/bin/fg21sim index 1f3e434..7a20074 100755 --- a/bin/fg21sim +++ b/bin/fg21sim @@ -69,8 +69,8 @@ def main(): t1_stop = time.perf_counter() t2_stop = time.process_time() - logger.info("Elapsed time: {0:.3f} (s)".format(t1_stop - t1_start)) - logger.info("CPU process time: {0:.3f} (s)".format(t2_stop - t2_start)) + logger.info("Elapsed time: %.1f [min]" % ((t1_stop-t1_start)/60)) + logger.info("CPU process time: %.1f [min]" % ((t2_stop-t2_start)/60)) if __name__ == "__main__": diff --git a/fg21sim/foregrounds.py b/fg21sim/foregrounds.py index be17068..cffc3be 100644 --- a/fg21sim/foregrounds.py +++ b/fg21sim/foregrounds.py @@ -117,8 +117,8 @@ class Foregrounds: t1_stop = time.perf_counter() t2_stop = time.process_time() logger.info("--------------------------------------------------") - logger.info("Elapsed time: %.3f [s]" % (t1_stop-t1_start)) - logger.info("CPU process time: %.3f [s]" % (t2_stop-t2_start)) + logger.info("Elapsed time: %.1f [min]" % ((t1_stop-t1_start)/60)) + logger.info("CPU process time: %.1f [min]" % ((t2_stop-t2_start)/60)) logger.info("--------------------------------------------------") def simulate(self): @@ -135,8 +135,8 @@ class Foregrounds: logger.info("==================================================") logger.info(">>> Time usage <<<") logger.info("==================================================") - for compId, t1, t2 in timers: - logger.info("%s : %.3f [s]" % (compID, t2-t1)) + for compID, t1, t2 in timers: + logger.info("%s : %.1f [min]" % (compID, (t2-t1)/60)) logger.info("--------------------------------------------------") def postprocess(self): |