mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-20 19:43:01 +00:00
also display total elapsed time
This commit is contained in:
parent
bf865b3e41
commit
e568bed77f
|
@ -55,6 +55,7 @@ def benchmark (folder):
|
|||
|
||||
total_unclassified = 0
|
||||
total_misclassified = 0
|
||||
total_time = 0.0
|
||||
|
||||
for name in os.listdir (images):
|
||||
|
||||
|
@ -120,6 +121,7 @@ def benchmark (folder):
|
|||
|
||||
total_unclassified += unclassified
|
||||
total_misclassified += misclassified
|
||||
total_time += end - start
|
||||
|
||||
gimp.delete (mask)
|
||||
gimp.delete (truth)
|
||||
|
@ -132,9 +134,10 @@ def benchmark (folder):
|
|||
except UnboundLocalError:
|
||||
pass
|
||||
|
||||
sys.stderr.write ("Total: %d %d %.2f%%\n" %
|
||||
sys.stderr.write ("Total: %d %d %.2f%% %.3fs\n" %
|
||||
(total_unclassified, total_misclassified,
|
||||
(total_misclassified * 100.0 / total_unclassified)))
|
||||
(total_misclassified * 100.0 / total_unclassified),
|
||||
total_time))
|
||||
|
||||
|
||||
def classified_pixels (mask):
|
||||
|
|
Loading…
Reference in a new issue