Changeset 23

Show
Ignore:
Timestamp:
09/25/08 16:23:14 (6 years ago)
Author:
robert
Message:

make this work in miliseconds, which is more inline with other pg tools (and still pretty darn precise for our needs)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tools/pgslowq

    r22 r23  
    1212  echo 
    1313  echo "        -q              quantize query runtimes." 
    14   echo "        -t              show queries over the specified # microseconds." 
     14  echo "        -t              show queries over the specified # miliseconds." 
    1515  echo "        -s #            show len bytes of the query (default: 4096)." 
    1616  echo "        -w              run destructively to work around DTrace bugs." 
     
    3434      LOG='postgres*:::statement-start 
    3535           /self->starttime && timestamp > self->starttime && 
    36             (timestamp - self->starttime) > (('"$US"') * 1000)/ 
     36            (timestamp - self->starttime) > (('"$US"') * 1000000)/ 
    3737           { 
    38              printf("%s/%d (%dus)\n%s\n============================\n", 
    39                     zonename, pid, (timestamp - self->starttime)/1000
     38             printf("%s/%d (%dms)\n%s\n============================\n", 
     39                    zonename, pid, (timestamp - self->starttime)/1000000
    4040                    self->sql); 
    4141           }' 
     
    5858/self->starttime && timestamp > self->starttime/ 
    5959{ 
    60   @q[zonename] = quantize((timestamp - self->starttime)/1000); 
     60  @q[zonename] = quantize((timestamp - self->starttime)/1000000); 
    6161} 
    6262postgres*:::statement-start