sl@0: /* sl@0: * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: #ifndef __T_SQLITEPERF_H__ sl@0: #define __T_SQLITEPERF_H__ sl@0: sl@0: typedef enum sl@0: { sl@0: EPerfTestSqlMode, //Symbian SQL performance tests sl@0: sl@0: EPerfTestSqliteSqlMode, //SQLite C API performance tests. The SQLite configuration matches the sl@0: //SQLite configuration used by the server build sl@0: sl@0: EPerfTestSqliteDefaultMode, //SQLite C API performance tests. Default SQLite configuration sl@0: // sl@0: EPerfTestModeCnt sl@0: } TPerfTestMode; sl@0: sl@0: typedef enum sl@0: { sl@0: EPerfTestMultiInsert, sl@0: EPerfTestMultiUpdate, sl@0: EPerfTestMultiDelete, sl@0: EPerfTestMultiSelect, sl@0: EPerfTestSingleInsert, sl@0: EPerfTestSingleUpdate, sl@0: EPerfTestSingleDelete, sl@0: EPerfTestSingleSelect, sl@0: // sl@0: EPerfTestTypeCnt sl@0: } TPerfTestType; sl@0: sl@0: #ifdef __cplusplus sl@0: extern "C" { sl@0: #endif sl@0: void SqliteInitialize(TPerfTestMode aMode); sl@0: void SqliteFinalize(TPerfTestMode aMode); sl@0: void SqliteMultiInsertTest(TPerfTestMode aPerfTestMode, const char aInsertSql[], int aInsertRecCnt); sl@0: void SqliteMultiUpdateTest(TPerfTestMode aPerfTestMode, const char aUpdateSql[], int aUpdateRecIds[], int aUpdateRecCnt); sl@0: void SqliteMultiDeleteTest(TPerfTestMode aPerfTestMode, const char aDeleteSql[], int aDeleteRecIds[], int aDeleteRecCnt); sl@0: void SqliteMultiSelectTest(TPerfTestMode aPerfTestMode, const char aSelectSql[], int aSelectRecIds[], int aSelectRecCnt); sl@0: void SqliteSingleInsertTest(TPerfTestMode aPerfTestMode, const char aSingleInsertSql[], TInt aInsertRecId); sl@0: void SqliteSingleUpdateTest(TPerfTestMode aPerfTestMode, const char aSingleUpdateSql[], TInt aUpdateRecId); sl@0: void SqliteSingleDeleteTest(TPerfTestMode aPerfTestMode, const char aSingleUpdateSql[], TInt aUpdateRecId); sl@0: void SqliteSingleSelectTest(TPerfTestMode aPerfTestMode, const char aSingleSelectSql[], TInt aSelectRecId); sl@0: void TestAbort(TInt aLine); sl@0: const char* TestDbName(void); sl@0: unsigned int FastCounterValue(void); sl@0: void StorePerfTestResult(TPerfTestMode aMode, TPerfTestType aType, unsigned int aResult); sl@0: void PrintS(const char* aFmt, const char* aMsg); sl@0: void PrintI(const char* aFmt, int a1); sl@0: void PrintIII(const char* aFmt, int a1, int a2, int a3); sl@0: #ifdef __cplusplus sl@0: } sl@0: #endif sl@0: sl@0: #endif /* __T_SQLITEPERF_H__ */