Revision 9526
Added by Aaron Marcuse-Kubitza over 11 years ago
tnrs_db | ||
---|---|---|
53 | 53 |
def process(): |
54 | 54 |
# Run TNRS |
55 | 55 |
log('Making TNRS request') |
56 |
cumulative_tnrs_profiler.start() |
|
57 |
try: stream = tnrs.tnrs_request(names) |
|
58 |
finally: |
|
59 |
cumulative_tnrs_profiler.stop(iter_ct=len(names)) |
|
60 |
log('Cumulatively: '+cumulative_tnrs_profiler.msg()) |
|
56 |
stream = tnrs.tnrs_request(names, |
|
57 |
cumulative_profiler=cumulative_tnrs_profiler) |
|
61 | 58 |
|
62 | 59 |
log('Storing TNRS response data') |
63 | 60 |
sql_io.append_csv(db, tnrs_data, *csvs.reader_and_header(stream)) |
Also available in: Unified diff
bin/tnrs_db: cumulative_tnrs_profiler: use tnrs.tnrs_request()'s new cumulative_profiler param instead of doing the profiling manually. this also ensures that there isn't extra time between when the cumulative profiler starts/stops and when the per-request profiler starts/stops (because Profiler's new add_subprofiler() method is used).