source: trunk/profileYaml.py @ 77

Revision 77, 546 bytes checked in by tim, 9 years ago (diff)

added tests folder

  • Property svn:executable set to *
Line 
1import profile
2import pstats
3import yaml
4import glob
5
6def loadAllFiles():
7    testFiles = glob.glob('TestingSuite/*.yml')
8    for file in testFiles:
9        docs = yaml.loadFile(file)
10        for doc in docs:
11            exercise(doc)
12
13def exercise(doc):               
14    if 'python' in doc:
15        if 'yaml' in doc:
16            for subDoc in yaml.load(doc['yaml']):
17                pass
18
19profile.run('loadAllFiles()', 'profileResults')
20
21p = pstats.Stats('profileResults')
22file = open("profile.out", "w")
23p.sort_stats('time').print_stats(25)
Note: See TracBrowser for help on using the repository browser.