123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- #!/usr/bin/python
- # Script for automatically run performance tests
- # author: sana
- # contributor: tct
- import subprocess
- # list of data structures
- teste = ["algorithms",
- "avl_tree",
- "b_tree",
- "binary_search_tree",
- "binary_tree",
- "doubly_linked_list",
- "hash_map",
- "hash_set",
- "heap",
- "interval_tree",
- "linked_list",
- "matrix",
- "mgraph",
- "pair",
- "queue",
- "red_black_tree",
- "scapegoat_tree",
- "skip_list",
- "sort",
- "splay_tree",
- "stack",
- "treap_tree",
- "tree_algorithms",
- "tree",
- "trie_tree",
- "vector"]
- EXEC = "./temelia_performance "
- # no. of failed and passed tests
- failed = 0
- passed = 0
- print "* Compiling performance tests..."
- subprocess.call("make")
- print "* Testing Temelia's performance..."
- for test in teste:
- if (subprocess.call(EXEC + test, shell=True) != 0):
- failed += 1
- else:
- passed += 1
-
- print "Done."
- print 'Statistics: ' + str(failed) + ' failed tests' + ' | ' + \
- str(passed) + ' passed tests.'
|