Hi, all I'm writing a program to test django's mysql performance, use timeit to profile. But it make my app into infinite loop. always write data into database.
How can I resolve it ? The source code like below: <pre> import timeit from django.shortcuts import render_to_response from testDjango.benchmark.models import Django loop_range = 10 def benchmark(request): global loop_range insert_timer = timeit.Timer("benchmark_insert()", "from testDjango.bench import benchmark_insert") insert_timer.repeat(loop_range) insert_speed = insert_timer.timeit() return render_to_response('benchmark.html', locals()) def benchmark_insert(): p1 = Django(foobar='Test foo',) p1.save() del p1 </pre> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---