diff -r 26645d81f48d -r cc28652e0254 persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestCompareStep.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/persistentstorage/centralrepository/test/testexecute/performance/src/TE_PerfTestCompareStep.cpp Wed Sep 01 12:39:58 2010 +0100 @@ -0,0 +1,110 @@ +// Copyright (c) 2005-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: +// + +#include "TE_PerfTestCompareStep.h" +#include "t_cenrep_helper.h" +#include +#include "srvreqs.h" +#include "srvdefs.h" +#include "cachemgr.h" + +//-------------------------------- +// class CPerfTestCompareStep +//-------------------------------- + +CPerfTestCompareStep::CPerfTestCompareStep() + { + SetTestStepName(KPerfTestCompareStep); + } + +// doTestStepL +// Implement the pure virtual function. +// Comapre the results of previous timing tests +TVerdict CPerfTestCompareStep::doTestStepL() + { +#ifndef __CENTREP_SERVER_CACHETEST__ + return EPass; +#else + SetTestStepResult(EFail); + + // To make sure future tests in this harness run under caching + TInt r = SetGetParameters(TIpcArgs(EEnableCache, KDefaultEvictionTimeout, KDefaultCacheSize)); + + TPtrC resultSection1; + _LIT(KSharedName1, "shared_name_1"); + TInt bRet = GetStringFromConfig(ConfigSection(), KSharedName1, resultSection1); + TESTL(bRet==1); + + TPtrC resultSection2; + _LIT(KSharedName2, "shared_name_2"); + bRet = GetStringFromConfig(ConfigSection(), KSharedName2, resultSection2); + TESTL(bRet==1); + + TBuf sharedString; + + ReadSharedDataL(resultSection1, sharedString); + + ReadResults(iResults1, sharedString); + sharedString.Zero(); + ReadSharedDataL(resultSection2, sharedString); + ReadResults(iResults2, sharedString); + + TESTL(iResults1.Count()==iResults2.Count()); + + for(TInt i=0; i& aArray, TBuf& aString) + { + TLex analyse(aString); + + TInt items; + TSummary summary; + + for(TInt i=0; i<2; i++) + { + analyse.Val(items); + analyse.SkipSpaceAndMark(); + for(TInt i=0;i