lowlevellibsandfws/pluginfw/Framework/ResolverTest/t_resolverperf.cpp
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #include <e32math.h>
       
    17 #include <hal.h>
       
    18 #include <e32test.h>
       
    19 #include <ecom/ecom.h>
       
    20 #include <ecom/ecomresolverparams.h>
       
    21 #include "Interface.h" // for TExampleInterfaceInitParams
       
    22 #include "EComPatchDataConstantv2.h"
       
    23 #include "../EcomTestUtils/EcomTestUtils.h"
       
    24 
       
    25 LOCAL_D RTest test(_L("Custom Resolver Load Time Performance Test"));
       
    26 
       
    27 _LIT8(KDummyData,"dummy");
       
    28 
       
    29 // KCExampleInterfaceUid is defined in "Interface.inl" !
       
    30 
       
    31 // custom resolvers available for testing.
       
    32 // 200126cd, A0001346 and A0001347 are allocated outside the
       
    33 // ECOM Uid Allocations.doc
       
    34 const TUid KDummyResolverUid2  = {0xA0001346};
       
    35 const TUid KDummyResolverUid3  = {0xA0001347};
       
    36 const TUid KExampleResolverUid = {0x10009DD0};
       
    37 const TUid KMyResolverUid      = {0x10009E12};
       
    38 const TUid KDummyResolverUid1  = {0x200126CD};
       
    39 
       
    40 const TInt KArraySize = 5;
       
    41 
       
    42 TUid MyResolvers[KArraySize] = {
       
    43 	KDummyResolverUid2,
       
    44 	KDummyResolverUid1,
       
    45 	KExampleResolverUid,
       
    46 	KMyResolverUid,
       
    47 	KDummyResolverUid3
       
    48 	};
       
    49 
       
    50 // The custom resolver in RAMOnly dir
       
    51 _LIT(KDummyRscInC, "c:\\resource\\plugins\\dummycustomresolver1.rsc");
       
    52 _LIT(KDummyDllInC, "c:\\sys\\bin\\dummycustomresolver1.dll");
       
    53 _LIT(KDummyRscInZ, "z:\\ramonly\\dummycustomresolver1.rsc");
       
    54 _LIT(KDummyDllInZ, "z:\\ramonly\\dummycustomresolver1.dll");
       
    55 
       
    56 // Copies the Plugins to specific folder for testing purpose
       
    57 LOCAL_C void CopyPluginsL()
       
    58 	{
       
    59 	EComTestUtils::FileManCopyFileL(KDummyRscInZ, KDummyRscInC);
       
    60 	EComTestUtils::FileManCopyFileL(KDummyDllInZ, KDummyDllInC);
       
    61 	}
       
    62 
       
    63 // Deleting plugin from the RAM for cleanup purpose
       
    64 LOCAL_C void DeleteTestPlugin()
       
    65 	{
       
    66 	TRAP_IGNORE(EComTestUtils::FileManDeleteFileL(KDummyRscInC));
       
    67 	TRAP_IGNORE(EComTestUtils::FileManDeleteFileL(KDummyDllInC));
       
    68 	}
       
    69 
       
    70 // converts fast counter ticks to milliseconds
       
    71 LOCAL_D TReal FastCountToMilliseconds(TUint32 aFastCount)
       
    72 	{
       
    73 	TInt freqInHz;
       
    74 	HAL::Get(HAL::EFastCounterFrequency, freqInHz);
       
    75 	TReal freqInkHz = (TReal)freqInHz / 1000;
       
    76 	return (TReal)aFastCount / freqInkHz;
       
    77 	}
       
    78 
       
    79 // counter wrap around subtraction
       
    80 LOCAL_D TUint32 ElaspedCounterTicks(TUint32 aStart, TUint32 aEnd)
       
    81 	{
       
    82 	if (aEnd >= aStart)
       
    83 		{
       
    84 		return (aEnd - aStart);
       
    85 		}
       
    86 	else
       
    87 		{
       
    88 		return (KMaxTUint32 - aStart + aEnd + 1);
       
    89 		}
       
    90 	}
       
    91 
       
    92 // sleep for 2 minutes and 15 seconds
       
    93 LOCAL_D void WaitForLazyUnloadPassL(void)
       
    94 	{
       
    95 	// Performance results from winscw do not count.
       
    96 	// Hence sleep only in armv5.
       
    97 #ifdef __ARMCC__
       
    98 	const TInt32 KLazyDllUnloadPeriod = 135; // actual is 2 minutes.
       
    99 
       
   100 	test.Printf(_L("sleep %d s to avoid lazy DLL unload\n"), KLazyDllUnloadPeriod);
       
   101 	User::After( KLazyDllUnloadPeriod * 1000000 );
       
   102 	test.Printf(_L("wake up after sleeping %d s\n"), KLazyDllUnloadPeriod);
       
   103 #endif
       
   104 
       
   105 	// Wait one second for plugin discovery
       
   106 #ifdef __X86GCC__
       
   107 	test.Printf(_L("sleep 1 s \n"));
       
   108 	User::After(1000000);
       
   109 	test.Printf(_L("wake up!\n"));
       
   110 #endif
       
   111 	}
       
   112 
       
   113 /** Check create test is within allowed limit.
       
   114 @return True means test pass. False means fail.
       
   115 */
       
   116 LOCAL_D TBool CheckCreatePerf(TReal aMilliseconds)
       
   117 	{
       
   118 	// These thresholds have 33% margin, i.e. when the limit is 320 ms,
       
   119 	// the expected result is about 240 ms.
       
   120 	const TReal KH2DpNandThreshold = 420.0;
       
   121 	const TReal KH2NandThreshold = 420.0;
       
   122 	const TReal KH2RamThreshold = 400.0;
       
   123 
       
   124 	const TReal KH4DpNandThreshold = 200.0;
       
   125 	const TReal KH4NandThreshold = 200.0;
       
   126 	const TReal KH4RamThreshold = 180.0;
       
   127 	const TReal KH4MMCThreshold = 225.0; 
       
   128 	//INFO: 'KH4MMCThreshold' is the threshold in case of WDP enabled configuration on H4.
       
   129     //       This was arrived at by running the test on a ROM built without the USE_DATA_PAGING defined.
       
   130 	//       The time taken by this operation in the above configuration was used to set this threshold
       
   131 
       
   132 	const TReal KH6DpNandThreshold = 150.0;
       
   133 	const TReal KH6NandThreshold = 150.0;
       
   134 	const TReal KH6RamThreshold = 140.0;
       
   135 
       
   136 
       
   137 	TReal threshold = 0.0;
       
   138 	switch (EComTestUtils::GetHardwareConfiguration())
       
   139 		{
       
   140 		case EPlatformH2RAM:
       
   141 			threshold = KH2RamThreshold;
       
   142 			break;
       
   143 		case EPlatformH2NAND:
       
   144 			threshold = KH2NandThreshold;
       
   145 			break;
       
   146 		case EPlatformH2NANDDP:
       
   147 			threshold = KH2DpNandThreshold;
       
   148 			break;
       
   149 		case EPlatformH4RAM:
       
   150 			threshold = KH4RamThreshold;
       
   151 			break;
       
   152 		case EPlatformH4MMC:
       
   153 			threshold = KH4MMCThreshold;
       
   154 			break;
       
   155 		case EPlatformH4NAND:
       
   156 			threshold = KH4NandThreshold;
       
   157 			break;
       
   158 		case EPlatformH4NANDDP:
       
   159 			threshold = KH4DpNandThreshold;
       
   160 			break;
       
   161 		case EPlatformH6RAM:
       
   162 			threshold = KH6RamThreshold;
       
   163 			break;
       
   164 		case EPlatformH6NAND:
       
   165 			threshold = KH6NandThreshold;
       
   166 			break;
       
   167 		case EPlatformH6NANDDP:
       
   168 			threshold = KH6DpNandThreshold;
       
   169 			break;
       
   170 		default:
       
   171 			// Ignore results on winscw and whatever unknown platform.
       
   172 			test.Printf(_L("custom resolver create perf test: %f ms\n"), aMilliseconds);
       
   173 			return ETrue;
       
   174 		}
       
   175 
       
   176 		test.Printf(_L("custom resolver create perf test: %f ms (limit %f)\n"), aMilliseconds, threshold);
       
   177 #ifdef _DEBUG
       
   178 		// the thresholds are for urel only
       
   179 		return ETrue;
       
   180 #else
       
   181 		return (threshold > aMilliseconds);
       
   182 #endif
       
   183 	}
       
   184 
       
   185 /** Check list test is within allowed limit.
       
   186 @return True means test pass. False means fail.
       
   187 */
       
   188 LOCAL_D TBool CheckListPerf(TReal aMilliseconds)
       
   189 	{
       
   190 	// These thresholds have 33% margin, i.e. when the limit is 300 ms,
       
   191 	// the expected result is about 200 ms.
       
   192 	const TReal KH2DpNandThreshold = 360.0;
       
   193 	const TReal KH2NandThreshold = 360.0;
       
   194 	const TReal KH2RamThreshold = 320.0;
       
   195 
       
   196 	const TReal KH4DpNandThreshold = 150.0;
       
   197 	const TReal KH4NandThreshold = 150.0;
       
   198 	const TReal KH4RamThreshold = 140.0;
       
   199 	const TReal KH4MMCThreshold = 140.0;
       
   200 	//INFO: 'KH4MMCThreshold' is the threshold in case of WDP enabled configuration on H4.
       
   201     //       This was arrived at by running the test on a ROM built without the USE_DATA_PAGING defined.
       
   202 	//       The time taken by this operation in the above configuration was used to set this threshold
       
   203 
       
   204 	const TReal KH6DpNandThreshold = 150.0;
       
   205 	const TReal KH6NandThreshold = 150.0;
       
   206 	const TReal KH6RamThreshold = 140.0;
       
   207 
       
   208 
       
   209 	TReal threshold = 0.0;
       
   210 	switch (EComTestUtils::GetHardwareConfiguration())
       
   211 		{
       
   212 		case EPlatformH2RAM:
       
   213 			threshold = KH2RamThreshold;
       
   214 			break;
       
   215 		case EPlatformH2NAND:
       
   216 			threshold = KH2NandThreshold;
       
   217 			break;
       
   218 		case EPlatformH2NANDDP:
       
   219 			threshold = KH2DpNandThreshold;
       
   220 			break;
       
   221 		case EPlatformH4RAM:
       
   222 			threshold = KH4RamThreshold;
       
   223 			break;
       
   224 		case EPlatformH4MMC:
       
   225 			threshold = KH4MMCThreshold;
       
   226 			break;
       
   227 		case EPlatformH4NAND:
       
   228 			threshold = KH4NandThreshold;
       
   229 			break;
       
   230 		case EPlatformH4NANDDP:
       
   231 			threshold = KH4DpNandThreshold;
       
   232 			break;
       
   233 		case EPlatformH6RAM:
       
   234 			threshold = KH6RamThreshold;
       
   235 			break;
       
   236 		case EPlatformH6NAND:
       
   237 			threshold = KH6NandThreshold;
       
   238 			break;
       
   239 		case EPlatformH6NANDDP:
       
   240 			threshold = KH6DpNandThreshold;
       
   241 			break;
       
   242 		default:
       
   243 			// Ignore results on winscw and whatever unknown platform.
       
   244 			test.Printf(_L("custom resolver list perf test: %f ms\n"), aMilliseconds);
       
   245 			return ETrue;
       
   246 		}
       
   247 
       
   248 		test.Printf(_L("custom resolver list perf test: %f ms (limit %f)\n"), aMilliseconds, threshold);
       
   249 #ifdef _DEBUG
       
   250 		// the thresholds are for urel only
       
   251 		return ETrue;
       
   252 #else
       
   253 		return (threshold > aMilliseconds);
       
   254 #endif
       
   255 	}
       
   256 
       
   257 /** Check create test in cache miss is within allowed limit.
       
   258 @return True means test pass. False means fail.
       
   259 */
       
   260 LOCAL_D TBool CheckCacheMissCreatePerf(TReal aMilliseconds)
       
   261 	{
       
   262 	// These thresholds have 33% margin, i.e. when the limit is 1200 ms,
       
   263 	// the expected result is about 900 ms.
       
   264 	const TReal KH2DpNandThreshold = 2250.0;
       
   265 	const TReal KH2NandThreshold = 2250.0;
       
   266 	const TReal KH2RamThreshold = 1000.0;
       
   267 
       
   268 	const TReal KH4DpNandThreshold = 1350.0;
       
   269 	const TReal KH4NandThreshold = 1350.0;
       
   270 	const TReal KH4RamThreshold = 500.0;
       
   271 	const TReal KH4MMCThreshold = 1350.0;
       
   272 	//INFO: 'KH4MMCThreshold' is the threshold in case of WDP enabled configuration on H4.
       
   273     //       This was arrived at by running the test on a ROM built without the USE_DATA_PAGING defined.
       
   274 	//       The time taken by this operation in the above configuration was used to set this threshold
       
   275 
       
   276 	const TReal KH6DpNandThreshold = 1000.0;
       
   277 	const TReal KH6NandThreshold = 1000.0;
       
   278 	const TReal KH6RamThreshold = 350.0;
       
   279 
       
   280 	TReal threshold = 0.0;
       
   281 	switch (EComTestUtils::GetHardwareConfiguration())
       
   282 		{
       
   283 		case EPlatformH2RAM:
       
   284 			threshold = KH2RamThreshold;
       
   285 			break;
       
   286 		case EPlatformH2NAND:
       
   287 			threshold = KH2NandThreshold;
       
   288 			break;
       
   289 		case EPlatformH2NANDDP:
       
   290 			threshold = KH2DpNandThreshold;
       
   291 			break;
       
   292 		case EPlatformH4RAM:
       
   293 			threshold = KH4RamThreshold;
       
   294 			break;
       
   295 		case EPlatformH4MMC:
       
   296 			threshold = KH4MMCThreshold;
       
   297 			break;
       
   298 		case EPlatformH4NAND:
       
   299 			threshold = KH4NandThreshold;
       
   300 			break;
       
   301 		case EPlatformH4NANDDP:
       
   302 			threshold = KH4DpNandThreshold;
       
   303 			break;
       
   304 		case EPlatformH6RAM:
       
   305 			threshold = KH6RamThreshold;
       
   306 			break;
       
   307 		case EPlatformH6NAND:
       
   308 			threshold = KH6NandThreshold;
       
   309 			break;
       
   310 		case EPlatformH6NANDDP:
       
   311 			threshold = KH6DpNandThreshold;
       
   312 			break;
       
   313 		default:
       
   314 			// Ignore results on winscw and whatever unknown platform.
       
   315 			test.Printf(_L("Cache miss create perf test: %f ms\n"), aMilliseconds);
       
   316 			return ETrue;
       
   317 		}
       
   318 
       
   319 		test.Printf(_L("Cache miss create perf test: %f ms (limit %f)\n"), aMilliseconds, threshold);
       
   320 #ifdef _DEBUG
       
   321 		// the thresholds are for urel only
       
   322 		return ETrue;
       
   323 #else
       
   324 		return (threshold > aMilliseconds);
       
   325 #endif
       
   326 	}
       
   327 
       
   328 /** Check list test in cache miss is within allowed limit.
       
   329 @return True means test pass. False means fail.
       
   330 */
       
   331 LOCAL_D TBool CheckCacheMissListPerf(TReal aMilliseconds)
       
   332 	{
       
   333 	// These thresholds have 33% margin, i.e. when the limit is 1200 ms,
       
   334 	// the expected result is about 900 ms.
       
   335 	const TReal KH2DpNandThreshold = 2250.0;
       
   336 	const TReal KH2NandThreshold = 2250.0;
       
   337 	const TReal KH2RamThreshold = 1000.0;
       
   338 
       
   339 	const TReal KH4DpNandThreshold = 1350.0;
       
   340 	const TReal KH4NandThreshold = 1350.0;
       
   341 	const TReal KH4RamThreshold = 500.0;
       
   342 	const TReal KH4MMCThreshold = 1350.0;
       
   343 	//INFO: 'KH4MMCThreshold' is the threshold in case of WDP enabled configuration on H4.
       
   344     //       This was arrived at by running the test on a ROM built without the USE_DATA_PAGING defined.
       
   345 	//       The time taken by this operation in the above configuration was used to set this threshold
       
   346 
       
   347 	TReal threshold = 0.0;
       
   348 	switch (EComTestUtils::GetHardwareConfiguration())
       
   349 		{
       
   350 		case EPlatformH2RAM:
       
   351 			threshold = KH2RamThreshold;
       
   352 			break;
       
   353 		case EPlatformH2NAND:
       
   354 			threshold = KH2NandThreshold;
       
   355 			break;
       
   356 		case EPlatformH2NANDDP:
       
   357 			threshold = KH2DpNandThreshold;
       
   358 			break;
       
   359 		case EPlatformH4RAM:
       
   360 			threshold = KH4RamThreshold;
       
   361 			break;
       
   362 		case EPlatformH4MMC:
       
   363 			threshold = KH4MMCThreshold;
       
   364 			break;
       
   365 		case EPlatformH4NAND:
       
   366 			threshold = KH4NandThreshold;
       
   367 			break;
       
   368 		case EPlatformH4NANDDP:
       
   369 			threshold = KH4DpNandThreshold;
       
   370 			break;
       
   371 		default:
       
   372 			// Ignore results on winscw and whatever unknown platform.
       
   373 			test.Printf(_L("Cache miss list perf test: %f ms\n"), aMilliseconds);
       
   374 			return ETrue;
       
   375 		}
       
   376 
       
   377 		test.Printf(_L("Cache miss list perf test: %f ms (limit %f)\n"), aMilliseconds, threshold);
       
   378 #ifdef _DEBUG
       
   379 		// the thresholds are for urel only
       
   380 		return ETrue;
       
   381 #else
       
   382 		return (threshold > aMilliseconds);
       
   383 #endif
       
   384 	}
       
   385 
       
   386 /** do custom resolver create test
       
   387 @return total ticks spent during the create request.
       
   388 */
       
   389 LOCAL_D TUint32 DoCreatePerfTestL(const TUid aResolverUid)
       
   390 	{
       
   391 	CExampleInterface::TExampleInterfaceInitParams initParams;
       
   392 	initParams.integer	= 1;
       
   393 	initParams.descriptor = NULL;
       
   394 	TAny* p = NULL;
       
   395 	TUid instanceKey;
       
   396 	TEComResolverParams resolverparams;
       
   397 	//Set any resolver data type as it will never reach the resolving part
       
   398 	resolverparams.SetDataType(KDummyData);
       
   399 	TUint32 startTime, endTime;
       
   400 
       
   401 	startTime = User::FastCounter();
       
   402 	p = REComSession::CreateImplementationL(KCExampleInterfaceUid,
       
   403 											instanceKey,
       
   404 											&initParams,
       
   405 											resolverparams,
       
   406 											aResolverUid);
       
   407 	endTime = User::FastCounter();
       
   408 
       
   409 	test(p != NULL);
       
   410 	REComSession::DestroyedImplementation(instanceKey);
       
   411 	CExampleInterface* impl = reinterpret_cast<CExampleInterface*>(p);
       
   412 	delete impl;
       
   413 
       
   414 	return ElaspedCounterTicks(startTime, endTime);
       
   415 	}
       
   416 
       
   417 /** do custom resolver list test
       
   418 @return total ticks spent during the list request.
       
   419 */
       
   420 LOCAL_D TUint32 DoListPerfTestL(const TUid aResolverUid)
       
   421 	{
       
   422 	TEComResolverParams resolverparams;
       
   423 	//Set any resolver data type as it will never reach the resolving part
       
   424 	resolverparams.SetDataType(KDummyData);
       
   425 	RImplInfoPtrArray ifArray;
       
   426 	TUint32 startTime, endTime;
       
   427 
       
   428 	startTime = User::FastCounter();
       
   429 	REComSession::ListImplementationsL(KCExampleInterfaceUid,
       
   430 									   resolverparams,
       
   431 									   aResolverUid,
       
   432 									   ifArray);
       
   433 	endTime = User::FastCounter();
       
   434 
       
   435 	test(ifArray.Count() > 0);
       
   436 	ifArray.ResetAndDestroy();
       
   437 
       
   438 	return ElaspedCounterTicks(startTime, endTime);
       
   439 	}
       
   440 
       
   441 /**
       
   442 @SYMTestCaseID		SYSLIB-ECOM-PT-4009
       
   443 @SYMTestCaseDesc 	Time how long it takes to do 100 create requests and
       
   444 					100 list requests involving custom resolvers.
       
   445 @SYMTestPriority 	High
       
   446 @SYMTestActions  	Run create and list requests in a loop.
       
   447 @SYMTestExpectedResults on hw testing, the time must be within prescribed threshold.
       
   448 @SYMCR CR1182
       
   449 */
       
   450 LOCAL_D void RunResolverPerfTestL()
       
   451 	{
       
   452 	test.Next(_L(" @SYMTestCaseID:SYSLIB-ECOM-PT-4009 Time a number of create and list requests\n "));
       
   453 
       
   454 	// If ECOM server is not yet running, the first message will take long
       
   455 	// time because ECOM has to scandir and parse spi file. So do a dummy run
       
   456 	// to kick start ECOM.
       
   457 	DoListPerfTestL(MyResolvers[0]);
       
   458 
       
   459 	const TInt KNumLoops = 100;
       
   460 	TInt j;
       
   461 
       
   462 	TUint32 createTicks = 0;
       
   463 	TUint32 listTicks = 0;
       
   464 	for (TInt i = 0; i < KNumLoops; i++)
       
   465 		{
       
   466 		j = i % KCustomResolverCacheSize;
       
   467 		createTicks += DoCreatePerfTestL(MyResolvers[j]);
       
   468 		listTicks += DoListPerfTestL(MyResolvers[j]);
       
   469 		}
       
   470 
       
   471 	REComSession::FinalClose();
       
   472 
       
   473 	TReal createMs = FastCountToMilliseconds(createTicks);
       
   474 	TBool createTestPass = CheckCreatePerf(createMs);
       
   475 
       
   476 	TReal listMs = FastCountToMilliseconds(listTicks);
       
   477 	TBool listTestPass = CheckListPerf(listMs);
       
   478 
       
   479 	test(createTestPass);
       
   480 	test(listTestPass);
       
   481 	}
       
   482 
       
   483 /**
       
   484 @SYMTestCaseID		SYSLIB-ECOM-PT-4010
       
   485 @SYMTestCaseDesc 	Verify CR1182 does not slow down list and create
       
   486 	request significantly if there are a lot of cache misses.
       
   487 @SYMTestPriority 	High
       
   488 @SYMTestActions  	Repeatedly do list and create requests with five
       
   489 	custom resolvers (1 more than max cache size). Time how long it takes.
       
   490 @SYMTestExpectedResults on hw testing, the time must be within prescribed threshold.
       
   491 @SYMCR CR1182
       
   492 */
       
   493 LOCAL_D void CacheMissPerfTestL()
       
   494 	{
       
   495 	test.Next(_L(" @SYMTestCaseID:SYSLIB-ECOM-PT-4010 Cache miss performance test\n "));
       
   496 
       
   497 	test(KArraySize > KCustomResolverCacheSize);
       
   498 
       
   499 	const TInt KNumLoops = 100;
       
   500 	TInt i, j;
       
   501 
       
   502 	TUint32 createTicks = 0;
       
   503 	for (i = 0; i < KNumLoops; i++)
       
   504 		{
       
   505 		j = i % KArraySize;
       
   506 		createTicks += DoCreatePerfTestL(MyResolvers[j]);
       
   507 		}
       
   508 
       
   509 	TUint32 listTicks = 0;
       
   510 	for (i = 0; i < KNumLoops; i++)
       
   511 		{
       
   512 		j = i % KArraySize;
       
   513 		listTicks += DoListPerfTestL(MyResolvers[j]);
       
   514 		}
       
   515 
       
   516 	REComSession::FinalClose();
       
   517 
       
   518 	TReal createMs = FastCountToMilliseconds(createTicks);
       
   519 	TBool createTestPass = CheckCacheMissCreatePerf(createMs);
       
   520 
       
   521 	TReal listMs = FastCountToMilliseconds(listTicks);
       
   522 	TBool listTestPass = CheckCacheMissListPerf(listMs);
       
   523 
       
   524 	test(createTestPass);
       
   525 	test(listTestPass);
       
   526 	}
       
   527 
       
   528 LOCAL_C void RunTestL()
       
   529 	{
       
   530 	__UHEAP_MARK;
       
   531 	CopyPluginsL();
       
   532 	WaitForLazyUnloadPassL();
       
   533 
       
   534 	RunResolverPerfTestL();
       
   535 	CacheMissPerfTestL();
       
   536 
       
   537 	// pause till ecom server flushes the cache.
       
   538 	// otherwise may affect the next test to run.
       
   539 	User::After(KCustomResolverCacheTimeout + 1000000);
       
   540 
       
   541 	DeleteTestPlugin();
       
   542 
       
   543 	__UHEAP_MARKEND;
       
   544 	}
       
   545 
       
   546 GLDEF_C TInt E32Main()
       
   547 	{
       
   548 	TInt err=KErrNone;
       
   549 	__UHEAP_MARK;
       
   550 
       
   551 	test.Title();
       
   552 	test.Start(_L("CR1182 Perf. tests."));
       
   553 
       
   554 	CTrapCleanup* cleanup = CTrapCleanup::New();
       
   555 	test(cleanup != NULL);
       
   556 
       
   557 	TRAP(err,RunTestL());
       
   558 	test(err == KErrNone);
       
   559 
       
   560 	delete cleanup;
       
   561 
       
   562 	test.End();
       
   563 	test.Close();
       
   564 
       
   565 	__UHEAP_MARKEND;
       
   566 	return(err);
       
   567 	}