#2 Webscript profiling

open
nobody
1
2002-04-19
2002-03-12
Anonymous
No

I think it would be nice to have a kind of profiling
support. Sometimes I need to analyse a webscript that
performs multiple database accesses (some very shot,
some a bit longer) when I click on a button.

It would be very usefull to let mtop collect all
databaseactions (or only those based on a regex) for a
certain time (e.g. 5 seconds) and then display them
with some statistics
- how many time this query has been performed during
the time interval.
- Average/Min/Max time spent on this query
- the other stats that are already there :-)

This would allow a quick overview of how efficient
scripts are written (many small accesses, redundant
queries, ...)

Perhaps mtop can query the database every 100ms
(adjustable rate) or something (during the
timeinterval), or use a mysql history somewhere if
possible?

Keep up the good work!

BC547

Discussion

  • Marc Prewitt

    Marc Prewitt - 2002-04-19

    Logged In: YES
    user_id=122471

    Interesting. I think this is best performed, as you alluded to, by looking at a history file. The problem with
    mtop is that it only sees the processes shown in the mysql process list at any given point in time. Even
    with decreasing the polling rate to 100ms, things would get missed.

    I have some other mysql admin tools which I've been thinking about releasing and I think I may put your
    request into one of these other tools.

     
  • Marc Prewitt

    Marc Prewitt - 2002-04-19
    • labels: 386776 --> Interface Improvements
    • priority: 5 --> 1
     
  • Tony

    Tony - 2003-01-17

    Logged In: YES
    user_id=25448

    I've gotta say this is exactly the kind of feature I was about to
    request. Many of the queries on my DB servers are web
    based and as stated in the previous post, many last only a
    fraction of a second. I have a very high SFJ count on the DB
    server. To have an update every 5 seconds is fine, but my
    server has probably processed 100 queries in that time.

    Obviously when hosting others applications, it is not feasible
    to trawl through 200 users perl / php code running explain on
    every single query in every single page of code on the
    webserver.

    It would be useful if the queries could be collected somehow,
    over a defined period using a temp file of some kind, and then
    be able to run explain on them.

    Cracking program though..... a fine piece of work, and most
    impressive!!

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks