Show
Ignore:
Timestamp:
01/30/08 21:48:29 (16 years ago)
Author:
jerome
Message:

Removed timing code which wasn't used anymore.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/storages/mysqlstorage.py

    r3294 r3308  
    2222 
    2323"""This module defines a class to access to a MySQL database backend.""" 
    24  
    25 import time 
    2624 
    2725from pykota.errors import PyKotaStorageError 
     
    7371    def beginTransaction(self) :     
    7472        """Starts a transaction.""" 
    75         self.before = time.time() 
    7673        self.cursor.execute("BEGIN;") 
    7774        self.tool.logdebug("Transaction begins...") 
     
    8077        """Commits a transaction.""" 
    8178        self.database.commit() 
    82         after = time.time() 
    8379        self.tool.logdebug("Transaction committed.") 
    84         #self.tool.logdebug("Transaction duration : %.4f seconds" % (after - self.before)) 
    8580         
    8681    def rollbackTransaction(self) :      
    8782        """Rollbacks a transaction.""" 
    8883        self.database.rollback() 
    89         after = time.time() 
    9084        self.tool.logdebug("Transaction aborted.") 
    91         #self.tool.logdebug("Transaction duration : %.4f seconds" % (after - self.before)) 
    9285         
    9386    def doRawSearch(self, query) : 
     
    9790            query += ';' 
    9891        try : 
    99             before = time.time() 
    10092            self.querydebug("QUERY : %s" % query) 
    10193            self.cursor.execute(query) 
    10294        except self.database.Error, msg :     
    103             raise PyKotaStorageError, str(msg) 
     95            raise PyKotaStorageError, repr(msg) 
    10496        else :     
    10597            # This returns a list of lists. Integers are returned as longs. 
    10698            result = self.cursor.fetchall() 
    107             after = time.time() 
    108             #self.tool.logdebug("Query Duration : %.4f seconds" % (after - before)) 
    10999            return result 
    110100             
     
    136126            query += ';' 
    137127        try : 
    138             before = time.time() 
    139128            self.querydebug("QUERY : %s" % query) 
    140129            self.cursor.execute(query) 
    141130        except self.database.Error, msg :     
    142131            self.tool.logdebug("Query failed : %s" % repr(msg)) 
    143             raise PyKotaStorageError, str(msg) 
    144         else :     
    145             after = time.time() 
    146             #self.tool.logdebug("Query Duration : %.4f seconds" % (after - before)) 
     132            raise PyKotaStorageError, repr(msg) 
    147133             
    148134    def doQuote(self, field) :