-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
67 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/python | ||
|
||
import os | ||
|
||
class RunStats: | ||
def __init__(self, stat_time, fname,test_name): | ||
lines=(open(fname,'r')).readlines() | ||
self.params=dict() | ||
for l in lines: | ||
s=l.split(' ') | ||
param_name=s[0] | ||
param_val=s[1] | ||
self.params[s[0]] = ((s[1]).rstrip()) | ||
self.stat_time= stat_time | ||
self.test_name = test_name.rstrip() | ||
|
||
|
||
def get(self, param_name): | ||
return self.params[param_name] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/usr/bin/python | ||
import os | ||
import sys | ||
|
||
from RunStats import * | ||
|
||
file_systems = [ "vfat", "ext2", "nilfs" ] | ||
tests_by_fs = dict() | ||
for fs in file_systems: | ||
tests_by_fs[fs] = [] | ||
|
||
def process_dir(d): | ||
stat_time=d.split('.')[0] | ||
files=os.listdir(d) | ||
test_names=(open(d+'/tests.log','r')).readlines() | ||
i = 0 | ||
files.sort() | ||
for f in files: | ||
if f[0] == 't': | ||
# test.log | ||
continue | ||
for fs in file_systems: | ||
if fs in test_names[i]: | ||
rs = RunStats(stat_time,d+"/"+f,test_names[i]) | ||
tests_by_fs[fs].append(rs) | ||
break | ||
i = i+1 | ||
|
||
|
||
def process_fs_tests(fs_name, run_stat_list): | ||
sorted(run_stat_list, key = lambda rs : rs.stat_time) | ||
print fs_name | ||
for rs in run_stat_list: | ||
print rs.test_name | ||
for k in rs.params.keys(): | ||
print k +": " + rs.get(k) | ||
|
||
args=sys.argv | ||
args.pop(0) | ||
for d in args: | ||
process_dir(d) | ||
|
||
|
||
for fs in file_systems: | ||
process_fs_tests(fs, tests_by_fs[fs]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters