Mercurial > hg > fail
diff fail.py @ 6:6496dae95f0d default tip
add a few more variables to track; we will want to output them
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Wed, 24 Aug 2016 17:05:10 -0700 |
parents | b407681e6f2c |
children |
line wrap: on
line diff
--- a/fail.py Tue Aug 23 16:36:39 2016 -0700 +++ b/fail.py Wed Aug 24 17:05:10 2016 -0700 @@ -39,10 +39,15 @@ # run the subcommand process = subprocess.Popen(options.command, shell=True) stdout, stderr = process.communicate() + + # update variables ctr += 1 + now = time.time() + duration = now - program_start_time + elapsed = now - start_loop # print iteration information - print ("Iteration {}".format(ctr)) + print ("Iteration {ctr}".format(ctr=ctr)) # test it if process.returncode not in options.codes: