longqueries.py
changeset 7 685b20d2d3ab
parent 5 57cf8fdff5ed
child 9 2fcc8ef0b97d
equal deleted inserted replaced
6:4ab077c93b2d 7:685b20d2d3ab
     1 #!/usr/bin/env python3.2
     1 #!/usr/bin/env python3.2
     2 
     2 
     3 from pgtools import pgstats
     3 from tools import pgstats, toolbase
     4 from toolbase import SimpleTool
       
     5 
     4 
     6 
     5 
     7 class LongQueriesTool(SimpleTool):
     6 class LongQueriesTool(toolbase.SimpleTool):
     8     def __init__(self):
     7     def __init__(self):
     9         SimpleTool.__init__(self, name='longqueries', desc='List long queries.')
     8         toolbase.SimpleTool.__init__(self, name='longqueries', desc='List long queries.')
    10         self.init()
     9         self.init()
    11 
    10 
    12     def main(self):
    11     def main(self):
    13         stats = pgstats.PgStats(self.pgm.get_conn('target'))
    12         stats = pgstats.PgStats(self.pgm.get_conn('target'))
    14 
    13