stats[r.status_code] = stats.get(r.status_code, 0) + 1
with print_lock:
- print ' ', threading.current_thread().name, 'results:', stats
+ print(' %s results: %s' % (threading.current_thread().name, stats))
results_queue.put(stats)
# Aggregate the results
stats = functools.reduce(operator.add, map(collections.Counter, results.queue))
- print '\n*** Test summary:'
- print ' Elapsed time: %.2fs' % t.secs
- print ' HTTP[OK] results: %d\n' % stats[200]
+ print('\n*** Test summary:')
+ print(' Elapsed time: %.2fs' % t.secs)
+ print(' HTTP[OK] results: %d\n' % stats[200])