diff options
| author | thibauth <thibauth@30fcff6e-8de6-41c7-acce-77ff6d1dd07b> | 2011-08-25 16:12:58 +0000 |
|---|---|---|
| committer | thibauth <thibauth@30fcff6e-8de6-41c7-acce-77ff6d1dd07b> | 2011-08-25 16:12:58 +0000 |
| commit | 8b62728dfdaee2f7344ecd9961493fa7927a3e27 (patch) | |
| tree | f976cc577b99cb36fe2650a6b4ee6d2e46d46531 /planetlab/plot.py | |
| parent | b66ef48aa1744c9bcc971825930e020dd88c2606 (diff) | |
| download | pacemaker-8b62728dfdaee2f7344ecd9961493fa7927a3e27.tar.gz | |
ping
git-svn-id: https://scm.gforge.inria.fr/svn/pacemaker@69 30fcff6e-8de6-41c7-acce-77ff6d1dd07b
Diffstat (limited to 'planetlab/plot.py')
| -rw-r--r-- | planetlab/plot.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/planetlab/plot.py b/planetlab/plot.py index 463aca8..e13a718 100644 --- a/planetlab/plot.py +++ b/planetlab/plot.py @@ -1,5 +1,5 @@ import os -projectdir ='/home/thibaut/projects/pacemaker/planetlab/data' +projectdir ='/home/thibaut/pacemaker/planetlab/data' result = [[]] for node in os.listdir(projectdir): c = 0 @@ -8,19 +8,20 @@ for node in os.listdir(projectdir): for logfile in os.listdir(os.path.join(projectdir,node,'log')): if '.net' in logfile: fh = open(os.path.join(projectdir,node,'log',logfile),"r") - c += len(fh.readlines()) + for line in fh: + tokens = line.split() + if tokens[1] > 0: + c+=1 fh.close() if '.prot' in logfile: fh = open(os.path.join(projectdir,node,'log',logfile),"r") - for line in fh.readlines(): + for line in fh: if 'Proof' in line: - try: - timestp, proof, nround, depth = line.rstrip().split() - preuve[nround]=1 - except ValueError: - import pdb;pdb.set_trace() + timestp, proof, nround, depth = line.rstrip().split() + preuve[nround]=1 fh.close() - result.append([node,c,len(preuve)]) + result.append([node,c,len(preuve)]) + print abs(c-len(preuve)*5.)/c except OSError: pass |
