Update contrib.
1 // Copyright (c) 2007-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
23 #include "t_simloadutils.h"
24 #include "t_simloadapp.h"
26 GLDEF_C TInt E32Main()
28 RDebug::Print(_L("T_SimLoadApp1::E32Main - entry"));
30 CTrapCleanup* TheTrapCleanup = CTrapCleanup::New();
32 TRAPD(err, StartTestL());
35 User::Panic(KTSimLoadAppPanic,err);
38 delete TheTrapCleanup;
40 RDebug::Print(_L("T_SimLoadApp1::E32Main - exit"));
44 LOCAL_C void StartTestL(void)
46 TInt mySimLoad = CTSimLoadAppUtils::SimLoadL();
48 // static simulated load
49 if (CTSimLoadAppUtils::IsStaticLoadL())
51 // when simulating the static load there are 3 simload
52 // apps executing at the same time. To harmonise the
53 // load a different number (seed value) is passed
54 // to the engine, hence 100000 in this case
55 CTSimLoadAppUtils::SimulateStaticLoadL(mySimLoad, 100000);
59 // spiked simulated load
60 CTSimLoadAppUtils::SimulateSpikedLoad();