os/persistentdata/persistentstorage/sqlite3api/TEST/t_sqliteperf.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/persistentdata/persistentstorage/sqlite3api/TEST/t_sqliteperf.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,73 @@
     1.4 +/*
     1.5 +* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description:
    1.18 +*
    1.19 +*/
    1.20 +
    1.21 +
    1.22 +
    1.23 +#ifndef __T_SQLITEPERF_H__
    1.24 +#define __T_SQLITEPERF_H__
    1.25 +
    1.26 +typedef enum 
    1.27 +	{
    1.28 +	EPerfTestSqlMode,				//Symbian SQL performance tests
    1.29 +	
    1.30 +	EPerfTestSqliteSqlMode,			//SQLite C API performance tests. The SQLite configuration matches the
    1.31 +									//SQLite configuration used by the server build
    1.32 +									
    1.33 +	EPerfTestSqliteDefaultMode,		//SQLite C API performance tests. Default SQLite configuration
    1.34 +	//
    1.35 +	EPerfTestModeCnt
    1.36 +	} TPerfTestMode;
    1.37 +	
    1.38 +typedef enum 
    1.39 +	{
    1.40 +	EPerfTestMultiInsert,
    1.41 +	EPerfTestMultiUpdate,
    1.42 +	EPerfTestMultiDelete,
    1.43 +	EPerfTestMultiSelect,
    1.44 +	EPerfTestSingleInsert,
    1.45 +	EPerfTestSingleUpdate,
    1.46 +	EPerfTestSingleDelete,
    1.47 +	EPerfTestSingleSelect,
    1.48 +	//
    1.49 +	EPerfTestTypeCnt
    1.50 +	} TPerfTestType;
    1.51 +
    1.52 +#ifdef __cplusplus
    1.53 +extern "C" {
    1.54 +#endif
    1.55 +	void SqliteInitialize(TPerfTestMode aMode);
    1.56 +	void SqliteFinalize(TPerfTestMode aMode);
    1.57 +	void SqliteMultiInsertTest(TPerfTestMode aPerfTestMode, const char aInsertSql[], int aInsertRecCnt);
    1.58 +	void SqliteMultiUpdateTest(TPerfTestMode aPerfTestMode, const char aUpdateSql[], int aUpdateRecIds[], int aUpdateRecCnt);
    1.59 +	void SqliteMultiDeleteTest(TPerfTestMode aPerfTestMode, const char aDeleteSql[], int aDeleteRecIds[], int aDeleteRecCnt);
    1.60 +	void SqliteMultiSelectTest(TPerfTestMode aPerfTestMode, const char aSelectSql[], int aSelectRecIds[], int aSelectRecCnt);
    1.61 +	void SqliteSingleInsertTest(TPerfTestMode aPerfTestMode, const char aSingleInsertSql[], TInt aInsertRecId);
    1.62 +	void SqliteSingleUpdateTest(TPerfTestMode aPerfTestMode, const char aSingleUpdateSql[], TInt aUpdateRecId);
    1.63 +	void SqliteSingleDeleteTest(TPerfTestMode aPerfTestMode, const char aSingleUpdateSql[], TInt aUpdateRecId);
    1.64 +	void SqliteSingleSelectTest(TPerfTestMode aPerfTestMode, const char aSingleSelectSql[], TInt aSelectRecId);
    1.65 +	void TestAbort(TInt aLine);
    1.66 +	const char* TestDbName(void);
    1.67 +	unsigned int FastCounterValue(void);
    1.68 +	void StorePerfTestResult(TPerfTestMode aMode, TPerfTestType aType, unsigned int aResult);
    1.69 +	void PrintS(const char* aFmt, const char* aMsg);
    1.70 +	void PrintI(const char* aFmt, int a1);
    1.71 +	void PrintIII(const char* aFmt, int a1, int a2, int a3);
    1.72 +#ifdef __cplusplus
    1.73 +}
    1.74 +#endif
    1.75 +
    1.76 +#endif /* __T_SQLITEPERF_H__ */