(status, factor=1, query_runs=5)
| 99 | |
| 100 | |
| 101 | def runit_query_runs(status, factor=1, query_runs=5): |
| 102 | # do some heavier reading |
| 103 | for i in range(query_runs): |
| 104 | status("Heavy query run #%d" % (i + 1)) |
| 105 | |
| 106 | report = [] |
| 107 | |
| 108 | # load all the Grunts, print a report with their name, stats, |
| 109 | # and their bosses' stats. |
| 110 | for grunt in sess.query(Grunt): |
| 111 | report.append( |
| 112 | ( |
| 113 | grunt.name, |
| 114 | grunt.savings, |
| 115 | grunt.employer.name, |
| 116 | grunt.employer.golf_average, |
| 117 | ) |
| 118 | ) |
| 119 | |
| 120 | sess.close() # close out the session |
| 121 | |
| 122 | |
| 123 | def run_with_profile(runsnake=False, dump=False): |
no test coverage detected