Update contrib.
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
25 #ifndef __PERFORMANCETEST_H__
26 #define __PERFORMANCETEST_H__
28 #include "t_testaction.h"
29 #include "t_testsetup.h"
32 const TInt KMaxIterations = 500;
34 _LIT8(KIterationsStart, "<iterations>");
35 _LIT8(KIterationsEnd, "</iterations>");
36 _LIT8(KTypeOfCryptoStart, "<cryptotype>");
37 _LIT8(KTypeOfCryptoEnd, "</cryptotype>");
38 _LIT8(KRSAStandard, "EStandard");
39 _LIT8(KRSAStandardCRT, "EStandardCRT");
41 // This class can be used to switch on/off performance testing
42 // It inherits from CTestAction so it can be used in the script
43 // but otherwise doesn't carry out any test.
44 // When in a script and enabled, the performance tester singleton
45 // is initialised and can then be used by all following tests in
46 // various performance operations
48 class CPerformanceTest : public CTestAction
51 static CTestAction* NewL(RFs& aFs, CConsoleBase& aConsole,
52 Output& aOut, const TTestActionSpec& aTestActionSpec);
53 static CTestAction* NewLC(RFs& aFs, CConsoleBase& aConsole,
54 Output& aOut, const TTestActionSpec& aTestActionSpec);
56 virtual ~CPerformanceTest();
57 virtual void PerformAction(TRequestStatus& aStatus);
59 CPerformanceTest(CConsoleBase& aConsole, Output& aOut);
60 virtual void ConstructL(const TTestActionSpec& aTestActionSpec);
61 virtual void DoPerformPrerequisite(TRequestStatus& aStatus);
62 virtual void DoPerformPostrequisite(TRequestStatus& aStatus);
63 virtual void DoReportAction(void){};
64 virtual void DoCheckResult(TInt){};
67 // static singleton tracks performance testing and provides
68 // standard operations for all performance tests
70 class CPerformance : public CBase
73 static CPerformance* NewL();
75 static CPerformance* PerformanceTester();
76 static void ClosePerformanceTester();
78 inline void SetTestingPerformance(TBool aTestPerformance) {iTestingPerformance=aTestPerformance;};
79 inline TBool IsTestingPerformance() const {return (iTestingPerformance);};
84 static CPerformance* iPerformanceTester;
86 TBool iTestingPerformance;
89 #endif // __PERFORMANCETEST_H__