Log how much time each rule took

Create issue
Issue #1155 resolved
Vivek Rai created an issue

Hi,

I was wondering if it is possible to log how much time each execution of each rule took. For example, started job at XX, finished at XX, took XX time. Please let me know if this functionality already exists and I have missed it.

Thanks!

Comments (6)

  1. Vivek Rai reporter

    Thanks Christian for your reply. Based on my understanding, I'd have to write the benchmark directive for "each" rule in my Snakefile. That appears very tedious to me.

    I'm wondering if there is a simpler solution where Snakemake simply logs when it started a job and when it completed a job as its output. I am only looking for a rough estimate of times.

  2. Christian Arnold

    Hi, yes, benchmark is once per rule, it is a bit repetitive true but mostly copy and paste. Otherwise, if you submitted the jobs via a cluster system, the error or output files should contain timestamp lines so you can calculate the running time on individual cases on your own. I am not sure whether this suffices already. Otherwise, the snakemake log should also be suitable to extract time information, although it can be a bit tedious to find the lines you look for. If none of these are appropriate enough, how exactly could you envision such a log system you want would work and why it might make sense to develop something in addition to the already existing functionality? ;-)

  3. Vivek Rai reporter

    I'm sorry -- does the Snakemake log file already include timestamp information? I wasn't sure of that. If that's the case, then yes, that is what I was looking for.

  4. Christian Arnold

    The --timestamp argument was removed a while ago, and newer versions of Snakemake output timestamp information by default, so the answer is yes, take a look ;). I will close this issue, feel free to reopen if there is anything else!

  5. Log in to comment