sl@0: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: @test sl@0: */ sl@0: sl@0: #include sl@0: #include sl@0: #include "t_simloadutils.h" sl@0: #include "t_simloadapp.h" sl@0: sl@0: GLDEF_C TInt E32Main() sl@0: { sl@0: RDebug::Print(_L("T_SimLoadApp3::E32Main - entry")); sl@0: sl@0: CTrapCleanup* TheTrapCleanup = CTrapCleanup::New(); sl@0: sl@0: TRAPD(err, StartTestL()); sl@0: if (err) sl@0: { sl@0: User::Panic(KTSimLoadAppPanic,err); sl@0: } sl@0: sl@0: delete TheTrapCleanup; sl@0: sl@0: RDebug::Print(_L("T_SimLoadApp3::E32Main - exit")); sl@0: return KErrNone; sl@0: } sl@0: sl@0: LOCAL_C void StartTestL(void) sl@0: { sl@0: TInt mySimLoad = CTSimLoadAppUtils::SimLoadL(); sl@0: sl@0: // static simulated load sl@0: if (CTSimLoadAppUtils::IsStaticLoadL()) sl@0: { sl@0: // when simulating the static load there are 3 simload sl@0: // apps executing at the same time. To harmonise the sl@0: // load a different number (seed value) is passed sl@0: // to the engine, hence 200000 in this case sl@0: CTSimLoadAppUtils::SimulateStaticLoadL(mySimLoad, 200000); sl@0: } sl@0: else sl@0: { sl@0: // spiked simulated load sl@0: // in a spiked load situation only simload1 sl@0: // executes a spiked load pattern, whilst simload2 sl@0: // and simload3 run in the background sl@0: CTSimLoadAppUtils::SimulateStaticLoadL(0, 200000); sl@0: } sl@0: }