searchsrv_plat/cpix_search_api/inc/qcpixsearcher.h
changeset 1 6f2c1c46032b
parent 0 671dee74050a
equal deleted inserted replaced
0:671dee74050a 1:6f2c1c46032b
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 #ifndef _QCPIXSEARCHER_H
    18 #ifndef _QCPIXSEARCHER_H
    19 #define _QCPIXSEARCHER_H
    19 #define _QCPIXSEARCHER_H
       
    20 
       
    21 //Uncomment the following line to enable performance measurements
       
    22 //#define OST_TRACE_COMPILER_IN_USE
       
    23 
       
    24 #ifdef OST_TRACE_COMPILER_IN_USE
       
    25 
       
    26 #include <qdatetime.h>
       
    27 #include <qdebug.h>
       
    28 #define PERF_SEARCH_START_TIMER  searchTimer.start();
       
    29 #define PERF_SEARCH_RESTART_TIMER searchTimer.restart();
       
    30 #define PERF_SEARCH_ENDLOG qDebug() << "Search QT API took: " << searchTimer.elapsed() << "msec";
       
    31 
       
    32 #define PERF_GETDOC_START_TIMER  getDocumentTimer.start();
       
    33 #define PERF_GETDOC_RESTART_TIMER getDocumentTimer.restart();
       
    34 #define PERF_GETDOC_ENDLOG qDebug() << "Search QT API took: " << getDocumentTimer.elapsed() << "msec";
       
    35 
       
    36 #define PERF_TIME_NOW(message) qDebug() << "Search QT API: " << QString(message) << ": " << QTime::currentTime().toString("hh:mm:ss.zzz");
       
    37 
       
    38 #else 
       
    39 
       
    40 #define PERF_SEARCH_START_TIMER  
       
    41 #define PERF_SEARCH_RESTART_TIMER 
       
    42 #define PERF_SEARCH_ENDLOG 
       
    43 #define PERF_GETDOC_START_TIMER
       
    44 #define PERF_GETDOC_RESTART_TIMER
       
    45 #define PERF_GETDOC_ENDLOG
       
    46 #define PERF_TIME_NOW(message)
       
    47 
       
    48 #endif
    20 
    49 
    21 /**
    50 /**
    22  * @file
    51  * @file
    23  * @ingroup Search Client API fpr Qt Clients
    52  * @ingroup Search Client API fpr Qt Clients
    24  * @brief Contains CCPixSearcher used for searching
    53  * @brief Contains CCPixSearcher used for searching
   222        */
   251        */
   223     QCPixSearcher( QString aDefaultSearchField=NULL );
   252     QCPixSearcher( QString aDefaultSearchField=NULL );
   224     
   253     
   225     QCPixSearcherPrivate* const iPvtImpl;
   254     QCPixSearcherPrivate* const iPvtImpl;
   226     Q_DECLARE_PRIVATE_D( iPvtImpl, QCPixSearcher )
   255     Q_DECLARE_PRIVATE_D( iPvtImpl, QCPixSearcher )
       
   256     
       
   257 #ifdef OST_TRACE_COMPILER_IN_USE
       
   258     QTime searchTimer; 
       
   259     QTime getDocumentTimer;
       
   260 #endif
   227     };
   261     };
   228 
   262 
   229 #endif //_QCPIXSEARCHER_H
   263 #endif //_QCPIXSEARCHER_H