this is a good point. So the question is now: should we just count calls or, for example, store them in a list the order they are executed (per transaction), or perhaps just store the type of queries in a list? What does the app need to know about the queries being executed?
On Apr 5, 3:27 pm, Thadeus Burgess <thade...@thadeusb.com> wrote: > I would like to hear what others think as well. > > I do not see how the DAL class knows, could know, might know, when a > query is being executed? > > -Thadeus > > On Mon, Apr 5, 2010 at 3:15 PM, mdipierro <mdipie...@cs.depaul.edu> wrote: > > Since the new DAL is a class you can define them by subclassing DAL. > > What do you think? I am not convinced this is useful in general and > > needs to be in trunk. It seems a very specialized application but > > perhaps I am missing something. I'd like to hear what other people > > think about this. > > > On Apr 5, 3:00 pm, Thadeus Burgess <thade...@thadeusb.com> wrote: > >> Ah, well the real goal is for it to only be the number of statements > >> pending in a given transaction. > > >> So db.commit() or db.rollback() should clear the results... > > >> The time counting I am doing in my models, and in response._caller... > >> but this is not including time taken to set up the environment before > >> web2py executes the models. > > >> -Thadeus > > >> On Mon, Apr 5, 2010 at 2:43 PM, mdipierro <mdipie...@cs.depaul.edu> wrote: > >> > But this does not count the time, just the number of past requests (in > >> > thread? total?). Am I wrong? > >> > Moreover the count will be wrong if the web server restarts the > >> > process. no? > > >> > Massimo > > >> > On Apr 5, 2:33 pm, Thadeus Burgess <thade...@thadeusb.com> wrote: > >> >> Novelty. Many websites you see will have at the bottom "time took to > >> >> process request, number of queries to database". > > >> >> -Thadeus > > >> >> On Mon, Apr 5, 2010 at 2:24 PM, mdipierro <mdipie...@cs.depaul.edu> > >> >> wrote: > >> >> > I do not see any reason against except that I do not see any reason in > >> >> > favor either. Why do you need it? > > >> >> > Massimo > > >> >> > On Apr 5, 2:16 pm, Thadeus Burgess <thade...@thadeusb.com> wrote: > >> >> >> Attached is a patch to allow the dal.py to keep track of query > >> >> >> counts and types. > > >> >> >> Usage > > >> >> >> >>> db.qry_count() > > >> >> >> {'SELECT': 5, 'INSERT': 2, 'DELETE': 1} > > >> >> >> Massimo, do you accept? > > >> >> >> -Thadeus > > >> >> >> qry_count.hg.diff > >> >> >> 1KViewDownload > > >> >> > -- > >> >> > You received this message because you are subscribed to the Google > >> >> > Groups "web2py-users" group. > >> >> > To post to this group, send email to web...@googlegroups.com. > >> >> > To unsubscribe from this group, send email to > >> >> > web2py+unsubscr...@googlegroups.com. > >> >> > For more options, visit this group > >> >> > athttp://groups.google.com/group/web2py?hl=en. > > >> > -- > >> > You received this message because you are subscribed to the Google > >> > Groups "web2py-users" group. > >> > To post to this group, send email to web...@googlegroups.com. > >> > To unsubscribe from this group, send email to > >> > web2py+unsubscr...@googlegroups.com. > >> > For more options, visit this group > >> > athttp://groups.google.com/group/web2py?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "web2py-users" group. > > To post to this group, send email to web...@googlegroups.com. > > To unsubscribe from this group, send email to > > web2py+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/web2py?hl=en. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.