From a7880d9a7d53610ea440ab70166ec0d40c27415a Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Thu, 23 Feb 2006 02:11:56 +0000 Subject: [PATCH] add params to pass to bench, remove debug messages, rewrite gnuplot_create add params to pass to bench, remove debug messages, rewrite gnuplot_create --- python/aubio/bench/node.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/python/aubio/bench/node.py b/python/aubio/bench/node.py index 22e231a6..55b2e4fb 100644 --- a/python/aubio/bench/node.py +++ b/python/aubio/bench/node.py @@ -88,7 +88,7 @@ def act_on_files (action,listfiles,listres=None,suffix='.txt',filter='f',sub='\. class bench: """ class to run benchmarks on directories """ - def __init__(self,datadir,resdir=None,checkres=False,checkanno=False): + def __init__(self,datadir,resdir=None,checkres=False,checkanno=False,params=[]): self.datadir = datadir # path to write results path to self.resdir = resdir @@ -96,6 +96,8 @@ class bench: self.reslist = [] # list used to gather results self.results = [] + if not params: self.params = taskparams() + else: self.params = params print "Checking data directory", self.datadir self.checkdata() if checkanno: self.checkanno() @@ -104,10 +106,8 @@ class bench: def checkdata(self): if os.path.isfile(self.datadir): self.dirlist = os.path.dirname(self.datadir) - print "DBG: found a file" elif os.path.isdir(self.datadir): self.dirlist = list_dirs(self.datadir) - print "DBG: found a dir" # allow dir* matching through find commands? else: print "ERR: path not understood" @@ -215,3 +215,9 @@ class bench: self.dir_exec() self.dir_eval() self.dir_plot() + + def dir_eval_print(self): + self.dir_exec() + self.dir_eval() + self.pretty_print() + -- 2.26.2