traceservices/tracefw/integ_test/ost/TEF/te_ostv2integsuite_performance/inc/te_perfapicall.h
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:39:58 +0100
branchRCL_3
changeset 24 cc28652e0254
parent 23 26645d81f48d
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201035 Kit: 201035

// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
// All rights reserved.
// This component and the accompanying materials are made available
// under the terms of "Eclipse Public License v1.0"
// which accompanies this distribution, and is available
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
//
// Initial Contributors:
// Nokia Corporation - initial contribution.
//
// Contributors:
//
// Description:
// Ost Performance Tests API Test Object
//



/**
 @file te_perfapicall.h
 @internalTechnology
 @prototype
*/

#ifndef TE_UPTAPICALLTESTS_H
#define TE_UPTAPICALLTESTS_H

#ifndef __KERNEL_MODE__
#include <e32base.h>
#include <f32file.h>
#endif
#include <opensystemtrace.h>
#include "te_tracecontrolcmds.h"
#include "te_apirunconfig.h"




class CApiCallTest: public CBase
	{
public:
	CApiCallTest();
	~CApiCallTest();
	//could get rid of this now if you want...
	TInt DoTestL(const TApiRunConfig& aApiRunConfig, TApiTestResult& aApiTestResult);
	TInt CachedTraceTime(TApiRunConfig& aApiRunConfig, TApiTestResult& aApiTestResult);
	TInt NonCachedTraceTime(TApiRunConfig& aApiRunConfig, TApiTestResult& aApiTestResult);
	TInt StackUsage(TApiRunConfig& aApiRunConfig, TApiTestResult& aApiTestResult);

	TInt Test();
private:
//performance test functions
//e.g.
//	ApiTestResult fred;
//	fred.minexecutintime = 009;
//	return fred;
	TInt FlushTheCache();
	//could really tidy these up to just 2routines now - leave for now tho

	//TInt TraceBaselineTime(const TApiRunConfig& aApiRunConfig, TUint64& aBaselineTime, TBool aDoTrace);
	//TInt TraceTime(const TApiRunConfig& aApiRunConfig, TUint64& aTime, const TUint64& aBaselineTime, TBool aDoTrace);
	TInt CachedTraceBaselineTime(TApiRunConfig& aApiRunConfig, TInt32& aMinimumExecutionBaselineTime);
	TInt CachedTraceTime(TApiRunConfig& aApiRunConfig, TInt32& aMinimumExecutionTime, TInt32& aMinimumExecutionBaselineTime);
	TInt NonCachedTraceBaselineTime(TApiRunConfig& aApiRunConfig, TInt32& aTypicalExecutionBaselineTime);
	TInt NonCachedTraceTime(TApiRunConfig& aApiRunConfig, TInt32& aTypicalExecutionTime, TInt32& aTypicalExecutionBaselineTime);

	TInt StackUsage(TApiRunConfig& aApiRunConfig, TInt& aApiStackUsage);

	TInt HeapUsage(TInt& aApiHeapUsage);
	TInt DoTheApiCall();
	TInt DoTheCommentedApiCall();

	//any tests for the private functions
	TInt TestStackUsage();

//	TApiTestResult iApiTestResult;
	};

#endif