|
1 /* |
|
2 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __T_SQLITEPERF_H__ |
|
21 #define __T_SQLITEPERF_H__ |
|
22 |
|
23 typedef enum |
|
24 { |
|
25 EPerfTestSqlMode, //Symbian SQL performance tests |
|
26 |
|
27 EPerfTestSqliteSqlMode, //SQLite C API performance tests. The SQLite configuration matches the |
|
28 //SQLite configuration used by the server build |
|
29 |
|
30 EPerfTestSqliteDefaultMode, //SQLite C API performance tests. Default SQLite configuration |
|
31 // |
|
32 EPerfTestModeCnt |
|
33 } TPerfTestMode; |
|
34 |
|
35 typedef enum |
|
36 { |
|
37 EPerfTestMultiInsert, |
|
38 EPerfTestMultiUpdate, |
|
39 EPerfTestMultiDelete, |
|
40 EPerfTestMultiSelect, |
|
41 EPerfTestSingleInsert, |
|
42 EPerfTestSingleUpdate, |
|
43 EPerfTestSingleDelete, |
|
44 EPerfTestSingleSelect, |
|
45 // |
|
46 EPerfTestTypeCnt |
|
47 } TPerfTestType; |
|
48 |
|
49 #ifdef __cplusplus |
|
50 extern "C" { |
|
51 #endif |
|
52 void SqliteInitialize(TPerfTestMode aMode); |
|
53 void SqliteFinalize(TPerfTestMode aMode); |
|
54 void SqliteMultiInsertTest(TPerfTestMode aPerfTestMode, const char aInsertSql[], int aInsertRecCnt); |
|
55 void SqliteMultiUpdateTest(TPerfTestMode aPerfTestMode, const char aUpdateSql[], int aUpdateRecIds[], int aUpdateRecCnt); |
|
56 void SqliteMultiDeleteTest(TPerfTestMode aPerfTestMode, const char aDeleteSql[], int aDeleteRecIds[], int aDeleteRecCnt); |
|
57 void SqliteMultiSelectTest(TPerfTestMode aPerfTestMode, const char aSelectSql[], int aSelectRecIds[], int aSelectRecCnt); |
|
58 void SqliteSingleInsertTest(TPerfTestMode aPerfTestMode, const char aSingleInsertSql[], TInt aInsertRecId); |
|
59 void SqliteSingleUpdateTest(TPerfTestMode aPerfTestMode, const char aSingleUpdateSql[], TInt aUpdateRecId); |
|
60 void SqliteSingleDeleteTest(TPerfTestMode aPerfTestMode, const char aSingleUpdateSql[], TInt aUpdateRecId); |
|
61 void SqliteSingleSelectTest(TPerfTestMode aPerfTestMode, const char aSingleSelectSql[], TInt aSelectRecId); |
|
62 void TestAbort(TInt aLine); |
|
63 const char* TestDbName(void); |
|
64 unsigned int FastCounterValue(void); |
|
65 void StorePerfTestResult(TPerfTestMode aMode, TPerfTestType aType, unsigned int aResult); |
|
66 void PrintS(const char* aFmt, const char* aMsg); |
|
67 void PrintI(const char* aFmt, int a1); |
|
68 void PrintIII(const char* aFmt, int a1, int a2, int a3); |
|
69 #ifdef __cplusplus |
|
70 } |
|
71 #endif |
|
72 |
|
73 #endif /* __T_SQLITEPERF_H__ */ |